mirror of
https://github.com/bellingcat/snscrape.git
synced 2026-06-12 20:38:29 +03:00
@@ -180,7 +180,12 @@ class TwitterSearchScraper(TwitterCommonScraper):
|
|||||||
continue
|
continue
|
||||||
for entry in entries:
|
for entry in entries:
|
||||||
if entry['entryId'].startswith('sq-I-t-'):
|
if entry['entryId'].startswith('sq-I-t-'):
|
||||||
|
if 'tweet' in entry['content']['item']['content']:
|
||||||
tweet = obj['globalObjects']['tweets'][entry['content']['item']['content']['tweet']['id']]
|
tweet = obj['globalObjects']['tweets'][entry['content']['item']['content']['tweet']['id']]
|
||||||
|
elif 'tombstone' in entry['content']['item']['content'] and 'tweet' in entry['content']['item']['content']['tombstone']:
|
||||||
|
tweet = obj['globalObjects']['tweets'][entry['content']['item']['content']['tombstone']['tweet']['id']]
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f'Unable to handle entry {entry["entryId"]!r}')
|
||||||
tweetID = tweet['id']
|
tweetID = tweet['id']
|
||||||
content = tweet['full_text']
|
content = tweet['full_text']
|
||||||
username = obj['globalObjects']['users'][tweet['user_id_str']]['screen_name']
|
username = obj['globalObjects']['users'][tweet['user_id_str']]['screen_name']
|
||||||
|
|||||||
Reference in New Issue
Block a user