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:
twitterKeys = [privateKey]
print("Booting")
ENDPOINT = endpoint()
ENDPOINT = {
"UserTweetsAndReplies": "CwLU7qTfeu0doqhSr6tW4A",
"TweetDetail": "BoHLKeBvibdYDiJON1oqTg",
}
print("Booted")
FeaturesDict = {
......@@ -307,9 +310,10 @@ def searchban(screen_name):
"withReactionsPerspective": False, "withSuperFollowsTweetFields": False, "withVoice": False, "withV2Timeline": False,
}
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:
replies = twitter_b.get("https://twitter.com/i/api/graphql/{}/{}".format(ENDPOINT["UserTweetsAndReplies"], "UserTweetsAndReplies"), params=get_reply_param)
ghostban = True
ghostTweetId = None
ghostReplyId = None
......@@ -434,7 +438,8 @@ def searchban(screen_name):
except KeyError as e:
print("Errored testing {}".format(screen_name))
print(e)
print("Response: " + replies.text)
#if replies is not None:
# print("Response: " + replies.text)
returnjson["tests"]["ghost"] = {}
returnjson["tests"]["more_replies"] = {}
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