Open ritiek opened 7 years ago
Randomly selecting a header from a given list increases the number of requests that can be made before it gets temporarily blocked.
What you are fundamentally doing is a brute search with random headers. This is not efficient.
Your goal is to search for answers in Quora. There are two alternatives I would suggest:
This way you would be able to run concurrent search queries(say 16) from qoura with a given browser header (if you care so ) for multiple searches. You could then even come up with a bunch of cached queries using something like an in memory db like Redis (although this would be a small scale project) and setup a UI that acts like ytinstant.com/ for qoura.
@codecakes Quora API does not exist.
If I use this (or any other search) link without logging in, it redirects me to the login page and tells me to login to see the search results.
So, the only way I can think of is scraping search engines. :confused:
So, the only way I can think of is scraping search engines. :confused:
Have you tried the second option yet that I proposed?
Let me go through your code again and suggest a PR soon. @ritiek
After looking around for some questions for a while, it stops giving results for any search term. This happens when there is not much delay between the searches. Thus, making DuckDuckGo temporarily block requests coming from the script.
Looking for a fix..