mirror of
https://github.com/bellingcat/snscrape.git
synced 2026-06-13 04:48:28 +03:00
@@ -1387,6 +1387,9 @@ class _TwitterAPIScraper(snscrape.base.Scraper):
|
|||||||
for entry in instruction['entries']:
|
for entry in instruction['entries']:
|
||||||
if entry['entryId'].startswith('tweet-'):
|
if entry['entryId'].startswith('tweet-'):
|
||||||
if entry['content']['entryType'] == 'TimelineTimelineItem' and entry['content']['itemContent']['itemType'] == 'TimelineTweet':
|
if entry['content']['entryType'] == 'TimelineTimelineItem' and entry['content']['itemContent']['itemType'] == 'TimelineTweet':
|
||||||
|
if 'result' not in entry['content']['itemContent']['tweet_results']:
|
||||||
|
_logger.warning(f'Skipping empty tweet entry {entry["entryId"]}')
|
||||||
|
continue
|
||||||
yield self._graphql_timeline_tweet_item_result_to_tweet(entry['content']['itemContent']['tweet_results']['result'])
|
yield self._graphql_timeline_tweet_item_result_to_tweet(entry['content']['itemContent']['tweet_results']['result'])
|
||||||
else:
|
else:
|
||||||
logger.warning('Got unrecognised timeline tweet item(s)')
|
logger.warning('Got unrecognised timeline tweet item(s)')
|
||||||
|
|||||||
Reference in New Issue
Block a user