So, I have a list of sub-reddits, and I use urllib to open them. When I go through them eventually urllib fails:
urllib2.HTTPError: HTTP Error 429: Unknown
After doing some research, I found that reddit limits the number of requests to its servers by IP:
Make no more than one request every two seconds. There is some permission for outbursts of requests, but they remain reasonable. In general, keep it no more than 30 requests per minute.
So I decided to use time.sleep() to limit my queries to one page every 10 seconds. It ends with the same success.
The above quote is taken from the reddit API . I do not use the reddit API. At the moment, Iām thinking about two things. Either this limit applies only to the reddit API, or urllib also has a limit.
Does anyone know which of these two things? Or how can I solve this problem?
python reddit urllib2
Florin stingaciu
source share