Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def write_tweets(keyword, file):
- #If the file exists, then read the existing data from the CSV file.
- if os.path.exists(file):
- df = pd.read_csv(file, header=0)
- else:
- df = pd.DataFrame(columns=COLS)
- #page attribute in tweepy.cursor and iteration
- for page in tweepy.Cursor(api.search, q=keyword,
- count=200, include_rts=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement