Created
April 10, 2023 19:27
-
-
Save zepadovani/7bb0abab3703a8527f334fd4f5c11346 to your computer and use it in GitHub Desktop.
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
import snscrape.modules.twitter as sntwitter | |
trecho_do_palindromo = "marrocos" | |
palindromos = [] | |
for i,tweet in enumerate(sntwitter.TwitterSearchScraper(f'#palindromo + {trecho_do_palindromo}').get_items()): | |
if i>100: | |
break | |
palindromos.append([tweet.date, "@"+tweet.user.username, tweet.rawContent]) | |
for p in palindromos: | |
print('['+p[0].strftime("%m/%d/%Y, %H:%M:%S")+'] ' + p[1] + ': ' + p[2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment