taspinar / twitterscraper

Scrape Twitter for Tweets
MIT License
2.4k stars 581 forks source link

Add "mentions" and "is_mentions" attributes to Tweet model #226

Closed nukopy closed 4 years ago

nukopy commented 4 years ago

Hi! I made small modifications to get infomation of mentions in tweets. I thought it might be useful:)

problem

Now, tweets we can get by twitterscraper has no mension information, so we can't tell the difference between normal tweets and mension tweets(tweets with like "@foo" to reply to another user).

modifications

By adding "is_mension" and "mension" attributes Tweet model(tweet.py), we will easily find if tweets are "normal" or "mention".

I mainly edited "Tweet" model in tweet.py.

This new attributes is just for tell the difference between 2 type tweets(normal / mention), not for make tweets threads by using tweet-id... Though it's trivial functions, it's very simple and helpful to use twitterscraper.