rchipka / node-osmosis

Web scraper for NodeJS
4.12k stars 246 forks source link

Throttling pagination #103

Open JonnyBGod opened 8 years ago

JonnyBGod commented 8 years ago

I am trying to crawl / scrape a list using pagination. Problem is that I get a "too many request" error after a few seconds.

How can we throttle paginations?

Placing a delay after paginate is not helping, the pagination keeps going and just delays the set command.

simonwjackson commented 7 years ago

I made a quick and dirty change to the pagination method in my fork, just to get this working.

paginate(selector, limit, sleep)

I haven't done extensive testing, but it works well for my application.

https://github.com/simonwjackson/node-osmosis/commit/b279d9e6317f4e31edd0eaaa8c914db067cb9302

hjalmarsn commented 6 years ago

Was this ever fixed in the original code?

akarabach commented 5 years ago

Any update here ?