Created
May 14, 2020 02:06
-
-
Save aditideokar93/974ecc970461d60c73f47a748dbacf22 to your computer and use it in GitHub Desktop.
Fetch tweetids using snscrape
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = "Aditi Doekar" | |
import os | |
politicians=['SpeakerPelosi','SenatorMenendez','SenStabenow','SenatorTester','SenWhitehouse','SenatorDurbin'] | |
for speaker in politicians: | |
os.system("snscrape --max-results 700 twitter-user "+speaker+" >D:\sns_scraper_tweet_recovery\\tweet_ids\\twitter-"+speaker) | |
""" | |
sample filename= twitter-SpeakerPelosi.txt | |
This file will contain the html links to the tweets fetched. eg.https://twitter.com/SpeakerPelosi/status/1259595056564047876 | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment