So I have a list of sub-reddits and I'm using urllib to open them. As I go through them eventually urllib fails with:
urllib2.HTTPError: HTTP Error 429: Unknown
Doing some research I found that reddit limits the ammount of requests to their servers by IP:
Make no more than one request every two seconds. There's some allowance for bursts of requests, but keep it sane. In general, keep it to no more than 30 requests in a minute.
So I figured I'd use time.sleep()
to limit my requests to one page each 10 seconds. This ends up failing just as well.
The quote above is grabbed from the reddit API page. I am not using the reddit API. At this point I'm thinking two things. Either that limit applies only to the reddit API or urllib also has a limit.
Does anyone know which one of these two things it is? Or how I could go around this issue?
urllib2
, as you could have found out by trying some other webpage. They might have blocked your IP from API access, try sending them an email. – Deformity