deedy5 / duckduckgo_search

Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine. Downloading files and images to a local hard drive.
MIT License
927 stars 117 forks source link

Update duckduckgo_search_async.py #170

Closed rphrp1985 closed 5 months ago

rphrp1985 commented 5 months ago

Responses with 202 response code is getting rate limit exception though requests is successful

deedy5 commented 5 months ago

Try testing your solution

rphrp1985 commented 5 months ago

i have tried maximum responses are returning 202 code due to which rate limit error is falsely thrown . when i have commented those lines it's working fine

deedy5 commented 5 months ago

duckduckgo returns 202 response code when a captcha appears. Yes, requests will continue to work, i.e. 202 response can be skipped. But in this case after a short time your ip will be blocked for a long time. I.e. exception is raised to avoid blocking.