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

Improve exception handling and add RatelimitException and TimeoutException #201

Closed deedy5 closed 3 months ago

deedy5 commented 3 months ago
  1. Add RatelimitException and TimeoutException
  2. _assession: set allow_redirects=False, _aget_url: remove _is_500_in_url() and check status for 301
  3. _aget_url: don't send requests if Exception is raised in other coroutine (added _exception_event = asyncio.Event())