简体   繁体   中英

Is there a python twitter search library that handle results the right way?

All the libraries I've tested search in twitter, let you specify the rpp (results per page) parameter but only gives you ONE page results.

It'd be cool a Python lib that provide a generator and each time gen.next() is called, a new search result is yielded. If the page is over, jump to the next page alone.

I'm not sure I understand what you are asking, but I think the limit on what you can get is not a library limitation, but an API limitation (imposed by Twitter). You can read the methods available in their REST API here . Excerpt:

rpp
The number of tweets to return per page, up to a max of 100.
http://search.twitter.com/search.json?rpp=100
page
The page number (starting at 1) to return, up to a max of roughly 1500 results
(based on rpp * page).
http://search.twitter.com/search.json?page=10

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM