Fix qrt issue
This commit is contained in:
parent
24812acd32
commit
dde6f889cb
10
twitfix.py
10
twitfix.py
@ -472,7 +472,15 @@ def rendercombined():
|
||||
|
||||
@app.route("/api/v1/statuses/<int:tweet_id>")
|
||||
def api_v1_status(tweet_id):
|
||||
tweetData = getTweetData(f"https://twitter.com/i/status/{tweet_id}")
|
||||
twitter_url=f"https://twitter.com/i/status/{tweet_id}"
|
||||
tweetData = getTweetData(twitter_url)
|
||||
if tweetData is None:
|
||||
log.error("Tweet Data Get failed for "+twitter_url)
|
||||
return message(msgs.failedToScan)
|
||||
qrt = None
|
||||
if 'qrtURL' in tweetData and tweetData['qrtURL'] is not None:
|
||||
qrt = getTweetData(tweetData['qrtURL'])
|
||||
tweetData['qrt'] = qrt
|
||||
if tweetData is None:
|
||||
abort(500) # this should cause Discord to fall back to the default embed
|
||||
return activitymg.tweetDataToActivity(tweetData)
|
||||
|
Loading…
x
Reference in New Issue
Block a user