Commit d13184b8 authored by nanahira's avatar nanahira

temp disable search

parent fb5b016f
Pipeline #21313 passed with stages
in 1 minute and 7 seconds
...@@ -111,14 +111,15 @@ def doSearch(screen_name, twitter_b): ...@@ -111,14 +111,15 @@ def doSearch(screen_name, twitter_b):
"include_ext_edit_control": 'true', "include_ext_edit_control": 'true',
"ext": 'mediaStats,highlightedLabel,hasNftAvatar,voiceInfo,birdwatchPivot,enrichments,superFollowMetadata,unmentionInfo,editControl,collab_control,vibe', "ext": 'mediaStats,highlightedLabel,hasNftAvatar,voiceInfo,birdwatchPivot,enrichments,superFollowMetadata,unmentionInfo,editControl,collab_control,vibe',
} }
response = twitter_b.get(searchurl_v2, params=params_v2) return None
search_v2 = response.json() #response = twitter_b.get(searchurl_v2, params=params_v2)
isHealthy = 'globalObjects' in search_v2 #search_v2 = response.json()
if isHealthy: #isHealthy = 'globalObjects' in search_v2
return search_v2["globalObjects"]["tweets"] #if isHealthy:
else: # return search_v2["globalObjects"]["tweets"]
print("Search error: " + response.text) #else:
return None # print("Search error: " + response.text)
# return None
@app.route('/_healthy') @app.route('/_healthy')
def healthy(): def healthy():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment