Commit 72030844 authored by nanahira's avatar nanahira

use new search api

parent eefb55f2
Pipeline #19658 canceled with stages
...@@ -69,31 +69,40 @@ async def Search(config, init): ...@@ -69,31 +69,40 @@ async def Search(config, init):
tweet_count = 100 tweet_count = 100
q = "" q = ""
params = [ params = [
# ('include_blocking', '1'), {"tweet_search_mode": "live"},
# ('include_blocked_by', '1'), {"include_profile_interstitial_type": 1},
# ('include_followed_by', '1'), {"include_blocked_by": 1},
# ('include_want_retweets', '1'), {"include_blocking": 1},
# ('include_mute_edge', '1'), {"include_followed_by": 1},
# ('include_can_dm', '1'), {"include_want_retweets": 1},
('include_can_media_tag', '1'), {"include_mute_edge": 1},
# ('skip_status', '1'), {"include_can_dm": 1},
# ('include_cards', '1'), {"include_can_media_tag": 1},
('include_ext_alt_text', 'true'), {"skip_status": 1},
('include_quote_count', 'true'), {"cards_platform": "Web-12"},
('include_reply_count', '1'), {"include_cards": 1},
('tweet_mode', 'extended'), {"include_ext_alt_text": 'true'},
('include_entities', 'true'), {"include_quote_count": 'true'},
('include_user_entities', 'true'), {"include_ext_limited_action_results": 'false'},
('include_ext_media_availability', 'true'), {"include_reply_count": 1},
('send_error_codes', 'true'), {"tweet_mode": "extended"},
('simple_quoted_tweet', 'true'), {"include_ext_collab_control": 'false'},
{"include_ext_views": 'true'},
{"include_entities": 'true'},
{"include_user_entities": 'true'},
{"include_ext_media_color": 'true'},
{"include_ext_media_availability": 'true'},
{"include_ext_sensitive_media_warning": 'true'},
{"include_ext_trusted_friends_metadata": 'true'},
{"send_error_codes": 'true'},
{"simple_quoted_tweet": 'true'},
{"query_source": "recent_search_click"},
{"pc": 1},
{"spelling_corrections": 1},
{"include_ext_edit_control": 'true'},
{"ext": 'mediaStats,highlightedLabel,hasNftAvatar,voiceInfo,birdwatchPivot,enrichments,superFollowMetadata,unmentionInfo,editControl,collab_control,vibe'},
('count', tweet_count), ('count', tweet_count),
('query_source', 'typed_query'),
# ('pc', '1'),
('cursor', str(init)), ('cursor', str(init)),
('spelling_corrections', '1'),
('ext', 'mediaStats%2ChighlightedLabel'),
('tweet_search_mode', 'live'), # this can be handled better, maybe take an argument and set it then
] ]
if not config.Popular_tweets: if not config.Popular_tweets:
params.append(('f', 'tweets')) params.append(('f', 'tweets'))
......
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