csu / quora-api

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

403 forbidden #36

Closed eduOS closed 9 years ago

eduOS commented 9 years ago

Hi, I made a mistake not setting the sleep time but just continuously crawling. Then, a 403 error occured immediately. Have you ever encountered such a problem? Unfortunately, it's Quora which is so restrict on such an issue. Thanks, Leo

csu commented 9 years ago

You might be blocked by IP. Trying running it on a different server.

eduOS commented 9 years ago

Thanks. You're right. What's funny is that I access the Internet via a DHCP IP. I just need to refresh the it.

eduOS commented 9 years ago

I've been banned again even though the sleep time between two requests was set to 5 seconds or 10 seconds. As you offer an API could you please tell me how do you set the time to avoid being forbidden? I didn't find such a setting in your code, in any of your quora related repository.

csu commented 9 years ago

First, even with dynamic IP addresses, you can get the same address twice. Second, get more IP addresses and/or make less requests. Third,

As you offer an API could you please tell me how to set the time to avoid being forbidden?

No.

eduOS commented 9 years ago

Thanks.

rohithpr commented 9 years ago

@csu - I'm considering Heroku for a project of mine. Was wondering if Heroku took care of this automatically. Or did you set up something?

csu commented 9 years ago

@rohithpr I'm not sure how Heroku assigns IPs, but I don't think I've ever had the quora-api Heroku instance ever get blocked by Quora. I know Heroku will sleep instances after they're inactive for a while and then reawaken them when necessary. Perhaps they get new IPs sometimes when that happens.

rohithpr commented 9 years ago

Cool! :+1: