Created
May 1, 2021 13:57
-
-
Save joaomacalos/3531504da450d9f6fee30fe7f103c03d to your computer and use it in GitHub Desktop.
hashtag2-defapi
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
# Query | |
query = "SuperLeague OR #SuperLeague -filter:retweets" | |
def collect_tweets(query, max_id=None, nitems=100, until=None, result_type='recent'): | |
if until is not None: | |
tweets = tweepy.Cursor(api.search, | |
q=query, | |
lang="en", | |
tweet_mode="extended", | |
result_type=result_type, | |
timezone='Europe/England', | |
until=until | |
).items(nitems) | |
else: | |
tweets = tweepy.Cursor(api.search, | |
q=query, | |
lang="en", | |
tweet_mode="extended", | |
result_type=result_type, | |
timezone='Europe/England', | |
max_id=max_id | |
).items(nitems) | |
return tweets |
Fala Pedro,
Assim sem mais informações eu não vou conseguir te ajudar. Vc não consegue
rodar nenhuma query no tweepy, ou vc não consegue rodar o loop que eu
escrevi? Pra te falar a verdade, essa análise dos tweets da super liga foi
a primeira vez que eu utilizei o `tweepy`. Acho que o melhor que vc pode
fazer é dar uma olhada na documentação do tweepy e do API do twitter pra
entender o que vc pode fazer com as funções.
João
…On Fri, May 14, 2021 at 4:47 AM Pedro L.C.A. ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Fala mestre, estou tentando fazer sua função rodar aqui no tweepy mas não
consigo fazer o advanced search rolar como no seu "query".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/3531504da450d9f6fee30fe7f103c03d#gistcomment-3742198>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJS76HXGAEU7YAJSN2YIFIDTNSFNDANCNFSM443T6UQA>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fala mestre, estou tentando fazer sua função rodar aqui no tweepy mas não consigo fazer o advanced search rolar como no seu "query".