【How to automatically get Twitter data through Python】
(Python自动抓取Twitter数据经验分享,中英双语)
It may be helpful for those who know a little Python but not a speciallized programmer.
(本经验适用于那些对Python略有了解、但并不精通编程的小伙伴)
Twitter is the most commonly used social media for Web3ers. If we have plenty of Twitter data, we can perform many interesting tasks, like automatically tracks a KOL’s new followings and find a project’s early followers. Here I'm going to share my experience for this automation:
Description: Twitter’s official access to get data. You can apply for a Twitter API in (developer.twitter.com/en/docs/twitte…) and use Tweepy (tweepy.org) to access the API through Python.
【Way 1: Twitter API】
Pros: Simple, Fast, Stable
Cons: (Fatal!) The requests rate are quite limited (900 requests/every 15min) for any research that requires large amount of data.
Description:Access the data by automatically control your browser to mimic real human’s actions and get the data through HTML. However, due to Twitter’s anti-scraper efforts, many public Github repository on Twitter scraper no longer works now.
Scweet(htttps://github.com/Altimis/Scweet) is an available repository, but it still needs many adjustments to make it work on your computer
Pros: No limits, Personalize
Cons: Complex, comparatively Slow, Unstable(depends on your network connections), Against the Twitter Terms
If find my experience sharing is helpful, please like&retweet it! I am going to share more relavant experiences if there are enough retweets~
如果你觉得我的经验分享有帮助,请点赞+转发!如果有足够的转发,我将分享更多的相关经验~
• • •
Missing some Tweet in this thread? You can try to
force a refresh