[twitter] update query hashes
This commit is contained in:
@@ -593,7 +593,11 @@ class TwitterListMembersExtractor(TwitterExtractor):
|
||||
"""Extractor for members of a Twitter list"""
|
||||
subcategory = "list-members"
|
||||
pattern = BASE_PATTERN + r"/i/lists/(\d+)/members"
|
||||
test = ("https://twitter.com/i/lists/784214683683127296/members",)
|
||||
test = ("https://twitter.com/i/lists/784214683683127296/members", {
|
||||
"pattern": TwitterTimelineExtractor.pattern,
|
||||
"range": "1-40",
|
||||
"count": 40,
|
||||
})
|
||||
|
||||
def items(self):
|
||||
self.login()
|
||||
@@ -1008,9 +1012,6 @@ class TwitterAPI():
|
||||
|
||||
auth_token = cookies.get("auth_token", domain=cookiedomain)
|
||||
|
||||
if not auth_token:
|
||||
self.user_media = self.user_media_legacy
|
||||
|
||||
self.headers = {
|
||||
"Accept": "*/*",
|
||||
"authorization": "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejR"
|
||||
@@ -1071,6 +1072,7 @@ class TwitterAPI():
|
||||
"withReactionsPerspective": False,
|
||||
}
|
||||
self.features = {
|
||||
"blue_business_profile_image_shape_enabled": False,
|
||||
"responsive_web_twitter_blue_verified_badge_is_enabled": True,
|
||||
"responsive_web_graphql_exclude_directive_enabled": True,
|
||||
"verified_phone_label_enabled": False,
|
||||
@@ -1104,7 +1106,7 @@ class TwitterAPI():
|
||||
}
|
||||
|
||||
def tweet_detail(self, tweet_id):
|
||||
endpoint = "/graphql/zXaXQgfyR4GxE21uwYQSyA/TweetDetail"
|
||||
endpoint = "/graphql/AV_lPTkN6Fc6LgerQpK8Zg/TweetDetail"
|
||||
variables = {
|
||||
"focalTweetId": tweet_id,
|
||||
"referrer": "profile",
|
||||
@@ -1122,7 +1124,7 @@ class TwitterAPI():
|
||||
endpoint, variables, ("threaded_conversation_with_injections_v2",))
|
||||
|
||||
def user_tweets(self, screen_name):
|
||||
endpoint = "/graphql/9rys0A7w1EyqVd2ME0QCJg/UserTweets"
|
||||
endpoint = "/graphql/BeHK76TOCY3P8nO-FWocjA/UserTweets"
|
||||
variables = {
|
||||
"userId": self._user_id_by_screen_name(screen_name),
|
||||
"count": 100,
|
||||
@@ -1134,7 +1136,7 @@ class TwitterAPI():
|
||||
return self._pagination_tweets(endpoint, variables)
|
||||
|
||||
def user_tweets_and_replies(self, screen_name):
|
||||
endpoint = "/graphql/ehMCHF3Mkgjsfz_aImqOsg/UserTweetsAndReplies"
|
||||
endpoint = "/graphql/eZVlZu_1gwb6hMUDXBnZoQ/UserTweetsAndReplies"
|
||||
variables = {
|
||||
"userId": self._user_id_by_screen_name(screen_name),
|
||||
"count": 100,
|
||||
@@ -1146,7 +1148,7 @@ class TwitterAPI():
|
||||
return self._pagination_tweets(endpoint, variables)
|
||||
|
||||
def user_media(self, screen_name):
|
||||
endpoint = "/graphql/MA_EP2a21zpzNWKRkaPBMg/UserMedia"
|
||||
endpoint = "/graphql/d_ONZLUHGCsErBCriRsLXg/UserMedia"
|
||||
variables = {
|
||||
"userId": self._user_id_by_screen_name(screen_name),
|
||||
"count": 100,
|
||||
@@ -1179,7 +1181,7 @@ class TwitterAPI():
|
||||
features=False)
|
||||
|
||||
def user_likes(self, screen_name):
|
||||
endpoint = "/graphql/XbHBYpgURwtklXj8NNxTDw/Likes"
|
||||
endpoint = "/graphql/fN4-E0MjFJ9Cn7IYConL7g/Likes"
|
||||
variables = {
|
||||
"userId": self._user_id_by_screen_name(screen_name),
|
||||
"count": 100,
|
||||
@@ -1203,7 +1205,7 @@ class TwitterAPI():
|
||||
features=features)
|
||||
|
||||
def list_latest_tweets_timeline(self, list_id):
|
||||
endpoint = "/graphql/FDI9EiIp54KxEOWGiv3B4A/ListLatestTweetsTimeline"
|
||||
endpoint = "/graphql/5DAiJG3bD77SiWEs4xViBw/ListLatestTweetsTimeline"
|
||||
variables = {
|
||||
"listId": list_id,
|
||||
"count": 100,
|
||||
@@ -1238,7 +1240,7 @@ class TwitterAPI():
|
||||
["twitter_objects"]["live_events"][event_id])
|
||||
|
||||
def list_by_rest_id(self, list_id):
|
||||
endpoint = "/graphql/KlGpwq5CAt9tCfHkV2mwYQ/ListByRestId"
|
||||
endpoint = "/graphql/D0EoyrDcct2MEqC-LnPzFg/ListByRestId"
|
||||
params = {
|
||||
"variables": self._json_dumps({
|
||||
"listId": list_id,
|
||||
@@ -1252,7 +1254,7 @@ class TwitterAPI():
|
||||
raise exception.NotFoundError("list")
|
||||
|
||||
def list_members(self, list_id):
|
||||
endpoint = "/graphql/XsAJX17RLgLYU8GALIWg2g/ListMembers"
|
||||
endpoint = "/graphql/tzsIIbGUH9RyFCVmtO2W2w/ListMembers"
|
||||
variables = {
|
||||
"listId": list_id,
|
||||
"count": 100,
|
||||
@@ -1262,7 +1264,7 @@ class TwitterAPI():
|
||||
endpoint, variables, ("list", "members_timeline", "timeline"))
|
||||
|
||||
def user_following(self, screen_name):
|
||||
endpoint = "/graphql/vTZwBbd_gz6aI8v6Wze21A/Following"
|
||||
endpoint = "/graphql/FaBzCqZXuQCb4PhB0RHqHw/Following"
|
||||
variables = {
|
||||
"userId": self._user_id_by_screen_name(screen_name),
|
||||
"count": 100,
|
||||
@@ -1271,7 +1273,7 @@ class TwitterAPI():
|
||||
return self._pagination_users(endpoint, variables)
|
||||
|
||||
def user_by_rest_id(self, rest_id):
|
||||
endpoint = "/graphql/QPSxc9lxrmrwnBzYkJI8eA/UserByRestId"
|
||||
endpoint = "/graphql/S2BkcAyFMG--jef2N6Dgzw/UserByRestId"
|
||||
params = {
|
||||
"variables": self._json_dumps({
|
||||
"userId": rest_id,
|
||||
@@ -1282,7 +1284,7 @@ class TwitterAPI():
|
||||
return self._call(endpoint, params)["data"]["user"]["result"]
|
||||
|
||||
def user_by_screen_name(self, screen_name):
|
||||
endpoint = "/graphql/nZjSkpOpSL5rWyIVdsKeLA/UserByScreenName"
|
||||
endpoint = "/graphql/k26ASEiniqy4eXMdknTSoQ/UserByScreenName"
|
||||
params = {
|
||||
"variables": self._json_dumps({
|
||||
"screen_name": screen_name,
|
||||
|
||||
Reference in New Issue
Block a user