[twitter] better warning

This commit is contained in:
Mort Yao 2022-06-20 23:04:56 +02:00
parent c0151a9775
commit a47960f6ed
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -53,7 +53,7 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs)
info = json.loads(api_content)
if item_id not in info['globalObjects']['tweets']:
# something wrong here
log.w(info['timeline']['instructions'][0]['addEntries']['entries'][0]['content']['item']['content']['tombstone']['tombstoneInfo']['richText']['text'])
log.wtf('[Failed] ' + info['timeline']['instructions'][0]['addEntries']['entries'][0]['content']['item']['content']['tombstone']['tombstoneInfo']['richText']['text'], exit_code=None)
return
elif 'extended_entities' in info['globalObjects']['tweets'][item_id]: