JustAnotherArchivist / snscrape

A social networking service scraper in Python
GNU General Public License v3.0
4.31k stars 698 forks source link

Fix AttributeError - Tombstone (or TweetRef) has no attribute "user" on TwitterProfileScraper #951

Closed novucs closed 1 year ago

novucs commented 1 year ago

Tombstone error can be reproduced while scraping the following user: preettytee TweetRef error user: LaDonnaKebabe

JustAnotherArchivist commented 1 year ago

This leads to TweetRef and Tombstone items getting skipped entirely. Unfortunately, due to the new conversation madness, it's impossible to know whether a tombstone was by the scraped user or not (I think), so the only safe option is to always return them. I'll implement a better fix.

novucs commented 1 year ago

This leads to TweetRef and Tombstone items getting skipped entirely. Unfortunately, due to the new conversation madness, it's impossible to know whether a tombstone was by the scraped user or not (I think), so the only safe option is to always return them. I'll implement a better fix.

Thanks, updated

JustAnotherArchivist commented 1 year ago

Oh, sorry, only saw your change now. My solution is more robust though, e.g. if the user were a UserRef, and also won't require further changes when another thing similar to TweetRef and Tombstone becomes necessary in the future.