snscrape icon indicating copy to clipboard operation
snscrape copied to clipboard

Unknown result type 'TweetTombstone' while using the TwitterUserProfileScraper

Open ronnypollak opened this issue 3 years ago • 3 comments

Hello!

I am using the TwitterUserProfileScraper to fetch the tweets and retweets of certain users. It works fine until I encounter the error "Unknown result type 'TweetTombstone'". As I have seen in another issue already I assume this means I fetched a deleted tweet.

My question is, how do I handle this TweetTombstone without encountering errors?

The code I am using is the following:

for handle in linke_handles:
    for tweet in enumerate(sntwitter.TwitterProfileScraper(handle).get_items()):
        if date_start < tweet[1].date < date_end:
            tweets_list1.append(tweet[1])

Here you can see the error:

image image

ronnypollak avatar Nov 29 '22 15:11 ronnypollak

What's your snscrape version, and do you have some examples of profiles that trigger this?

JustAnotherArchivist avatar Nov 29 '22 18:11 JustAnotherArchivist

Hello, my snscrape version is 0.4.3.20220106. For example, the user handle "SevimDagdelen" triggers this Exception.

ronnypollak avatar Nov 29 '22 19:11 ronnypollak

This is closely related to #433. The specific problematic tweet is 979340820968026112, and that's age-restricted. Why that's sometimes TweetTombstone and sometimes TweetUnavailable is beyond me.

JustAnotherArchivist avatar Dec 01 '22 15:12 JustAnotherArchivist