-
-
Save Brittt94/c6741d5c8d7b1e68376044a5fb04bd46 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import pandas as pd | |
from twitter_scraper import get_tweets | |
import xlrd | |
searchquery1 = "@ScottMorrisonMP" | |
searchquery2 = "@GregHuntMP" | |
searchquery3 = "@healthgovau" | |
dataset = [] | |
for searchquery in [searchquery1, searchquery2, searchquery3]: | |
for tweets in get_tweets(searchquery): | |
dataset.append(tweets) | |
print(dataset) | |
df = pd.DataFrame(dataset) | |
df.to_excel('BTtwitterdata.xlsx') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment