csu / quora-api

An unofficial API for Quora.
https://quora.christopher.su
Other
295 stars 65 forks source link

Is there any way to page through the activity list? #7

Closed apaternite closed 9 years ago

apaternite commented 9 years ago

I noticed the activity results are limited to about 100 results. Is there any way to page through them?

erwanor commented 9 years ago

In the current state no but it would not be too hard to implement I think. Right now get_user_activity (pyquora) fetch data from /rss . It is generated by Quora using PyRSS2Gen. I am looking at the doc to know if there is a way to specify parameter directly in the URL to output more results. If it is not possible we can make a method that can takes an argument "size" about the output, scrap and parse the raw data ourselves. What do you think @csu ?

Note: I can start to work on that in two days when all my finals are over.

csu commented 9 years ago

Unfortunately, only a certain number of entries is made available by Quora through their /rss endpoint. If we want to get more than that, we'll have to rewrite the entire activity section of the library to scrape sections of profiles instead. Scraping gets difficult though, because Quora uses infinite scrolling to load sections of content at a time, so we might even end up having to simulate a web browser or something to get more content than what is initially shown.