mirror of
https://github.com/bellingcat/snscrape.git
synced 2026-06-08 02:28:29 +03:00
Fix KeyError caused by retweets without URLs in TwitterProfileScraper
This commit is contained in:
@@ -605,6 +605,9 @@ class _TwitterAPIScraper(snscrape.base.Scraper):
|
||||
i = kwargs['tcooutlinks'].index(card.url)
|
||||
except ValueError:
|
||||
_logger.warning('Could not find card URL in tcooutlinks')
|
||||
except KeyError:
|
||||
# retweets are missing this attribute
|
||||
pass
|
||||
else:
|
||||
card.url = kwargs['outlinks'][i]
|
||||
return Tweet(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user