Cómo hacer que la búsqueda de Twitter a través de Tweepy sea más rápida
Frecuentes
Visto 447 equipos
2
I am using ´tweepy´ library in Python to query tweets from Twitter. I am using a simple query :
query = "google"
f = open('output.txt', 'w')
for tweet in tweepy.Cursor(api.search,
query,
count=100,
result_type="recent",
include_entities=True,
lang="en").items():
f.write(str(tweet.created_at) +'\n')
f.write(tweet.text.encode('utf-8') + '\n')
#print tweet.created_at, tweet.text
I notice that, this query takes a lot of time to generate the output, upto 25 minutes. Any idea how this can be made faster ?
Muchas Gracias
0 Respuestas
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas python twitter tweepy or haz tu propia pregunta.
Honestly, you don't get much simpler than that... It might be an issue with your machine? - Luigi
You can try limiting the result of the search, e.g. max 50 tweets
lang="en").items(50):
- justomat