Skip to content

Commit

Permalink
Update: [Server][Utils/TwitterGraphQLAPI] GraphQL API へのリクエストペイロードを最新…
Browse files Browse the repository at this point in the history
…の Twitter Web App に合わせて修正
  • Loading branch information
tsukumijima committed May 20, 2024
1 parent ca2d9c3 commit fb8777a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server/app/utils/TwitterGraphQLAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ async def createTweet(self, tweet: str, media_ids: list[str] = []) -> schemas.Po
# Twitter GraphQL API にリクエスト
response = await self.invokeGraphQLAPI(
method = 'POST',
query_id = 'zIdRTsSqcD6R5uMtm_N0pw',
query_id = 'BTWYQFqX-WbKZOhykzDpRg',
endpoint = 'CreateTweet',
variables = {
'tweet_text': tweet,
Expand Down Expand Up @@ -279,7 +279,6 @@ async def createTweet(self, tweet: str, media_ids: list[str] = []) -> schemas.Po
'freedom_of_speech_not_reach_fetch_enabled': True,
'standardized_nudges_misinfo': True,
'tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled': True,
'tweet_with_visibility_results_prefer_gql_media_interstitial_enabled': True,
'responsive_web_graphql_skip_user_profile_image_extensions_enabled': False,
'responsive_web_graphql_timeline_navigation_enabled': True,
'responsive_web_enhance_cards_enabled': False,
Expand Down Expand Up @@ -630,7 +629,7 @@ async def homeLatestTimeline(self,
# Twitter GraphQL API にリクエスト
response = await self.invokeGraphQLAPI(
method = 'POST',
query_id = 'eL8vHLgEw2ZL9X9dKdakLQ',
query_id = 'DMcXrg09aYpRMKk7PekcBg',
endpoint = 'HomeLatestTimeline',
variables = variables,
features = {
Expand All @@ -654,7 +653,6 @@ async def homeLatestTimeline(self,
'freedom_of_speech_not_reach_fetch_enabled': True,
'standardized_nudges_misinfo': True,
'tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled': True,
'tweet_with_visibility_results_prefer_gql_media_interstitial_enabled': True,
'rweb_video_timestamps_enabled': True,
'longform_notetweets_rich_text_read_enabled': True,
'longform_notetweets_inline_media_enabled': True,
Expand Down Expand Up @@ -724,7 +722,7 @@ async def searchTimeline(self,
# Twitter GraphQL API にリクエスト
response = await self.invokeGraphQLAPI(
method = 'GET',
query_id = '5yhbMCF0-WQ6M8UOAs1mAg',
query_id = 'Ow4YOCqr4TR1W5vDqb0HAw',
endpoint = 'SearchTimeline',
variables = variables,
features = {
Expand All @@ -748,7 +746,6 @@ async def searchTimeline(self,
'freedom_of_speech_not_reach_fetch_enabled': True,
'standardized_nudges_misinfo': True,
'tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled': True,
'tweet_with_visibility_results_prefer_gql_media_interstitial_enabled': True,
'rweb_video_timestamps_enabled': True,
'longform_notetweets_rich_text_read_enabled': True,
'longform_notetweets_inline_media_enabled': True,
Expand Down

0 comments on commit fb8777a

Please sign in to comment.