How can I download datasets for sentiment analysis from Twitter?

krishna2000

BANNED
Joined
Dec 19, 2020
Messages
10
Reaction score
0
I am working on a project given to me for which I need Twitter datasets for some hashtags and keywords. Can anybody help me?
Thanks in advance!
 
You can use snscrape - https://github.com/JustAnotherArchivist/snscrape. It can do exactly what you need. You can extract all tweet data by keyword, profile, etc.

Here is an article on how to use it: https://medium.com/better-programming/how-to-scrape-tweets-with-snscrape-90124ed006af.

To extract all data on tweets and not only links, you need to use --jsonl option. When I started using snscrape myself a couple of month ago, this option was only available in github version, but not on pypi. So it is better to install it from github.
 
You can use snscrape - https://github.com/JustAnotherArchivist/snscrape. It can do exactly what you need. You can extract all tweet data by keyword, profile, etc.

Here is an article on how to use it: https://medium.com/better-programming/how-to-scrape-tweets-with-snscrape-90124ed006af.

To extract all data on tweets and not only links, you need to use --jsonl option. When I started using snscrape myself a couple of month ago, this option was only available in github version, but not on pypi. So it is better to install it from github.
Thank you. I will try it.
 
Back
Top