Commit fb5b016f authored by nanahira's avatar nanahira

use fixed graphql endpoints

parent 230a6deb
Pipeline #19882 passed with stages
in 57 seconds
...@@ -33,7 +33,10 @@ if privateKey: ...@@ -33,7 +33,10 @@ if privateKey:
twitterKeys = [privateKey] twitterKeys = [privateKey]
print("Booting") print("Booting")
ENDPOINT = endpoint() ENDPOINT = {
"UserTweetsAndReplies": "CwLU7qTfeu0doqhSr6tW4A",
"TweetDetail": "BoHLKeBvibdYDiJON1oqTg",
}
print("Booted") print("Booted")
FeaturesDict = { FeaturesDict = {
...@@ -307,9 +310,10 @@ def searchban(screen_name): ...@@ -307,9 +310,10 @@ def searchban(screen_name):
"withReactionsPerspective": False, "withSuperFollowsTweetFields": False, "withVoice": False, "withV2Timeline": False, "withReactionsPerspective": False, "withSuperFollowsTweetFields": False, "withVoice": False, "withV2Timeline": False,
} }
get_reply_param = param = {"variables": json.dumps(get_reply_vars), "features": FeaturesJson} get_reply_param = param = {"variables": json.dumps(get_reply_vars), "features": FeaturesJson}
replies = twitter_b.get("https://twitter.com/i/api/graphql/{}/{}".format(ENDPOINT["UserTweetsAndReplies"], "UserTweetsAndReplies"), params=get_reply_param) replies = None
try: try:
replies = twitter_b.get("https://twitter.com/i/api/graphql/{}/{}".format(ENDPOINT["UserTweetsAndReplies"], "UserTweetsAndReplies"), params=get_reply_param)
ghostban = True ghostban = True
ghostTweetId = None ghostTweetId = None
ghostReplyId = None ghostReplyId = None
...@@ -434,7 +438,8 @@ def searchban(screen_name): ...@@ -434,7 +438,8 @@ def searchban(screen_name):
except KeyError as e: except KeyError as e:
print("Errored testing {}".format(screen_name)) print("Errored testing {}".format(screen_name))
print(e) print(e)
print("Response: " + replies.text) #if replies is not None:
# print("Response: " + replies.text)
returnjson["tests"]["ghost"] = {} returnjson["tests"]["ghost"] = {}
returnjson["tests"]["more_replies"] = {} returnjson["tests"]["more_replies"] = {}
hasFailure = True hasFailure = True
......
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