From 082cb17347a918a1cb2e7a3218e818e0ccd87f42 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 4 Nov 2025 17:41:08 +0000 Subject: [PATCH] Don't use explicit bearer token --- twExtract/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twExtract/__init__.py b/twExtract/__init__.py index 1e29950..c854b61 100644 --- a/twExtract/__init__.py +++ b/twExtract/__init__.py @@ -279,7 +279,7 @@ def extractStatusV2(url,workaroundTokens): def request_with_token(twid, authToken): vars = json.loads('{"includeTweetImpression":true,"includeHasBirdwatchNotes":false,"includeEditPerspective":false,"rest_ids":["x"],"includeEditControl":true,"includeCommunityTweetRelationship":true,"includeTweetVisibilityNudge":true}') vars['rest_ids'][0] = str(twid) - tweet = twitterApiGet(f"https://x.com/i/api/graphql/{v2graphql_api}/TweetResultsByIdsQuery?variables={urllib.parse.quote(json.dumps(vars))}&features={urllib.parse.quote(v2Features)}",authToken=authToken,btoken=v2bearer) + tweet = twitterApiGet(f"https://x.com/i/api/graphql/{v2graphql_api}/TweetResultsByIdsQuery?variables={urllib.parse.quote(json.dumps(vars))}&features={urllib.parse.quote(v2Features)}",authToken=authToken) try: rateLimitRemaining = tweet.headers.get("x-rate-limit-remaining") print(f"Twitter Token Rate limit remaining: {rateLimitRemaining}")