Skip to content

Commit

Permalink
V3.9.8 (#138)
Browse files Browse the repository at this point in the history
1) add core exceptions,
2) remove retries in _get_url(),
3) raise ApiException if resp.status_code==403,
4) raise RateLimitException if resp.status_code==202,
5) sleep(0.75) between API requests if proxies is None,
6) sort imports, lint and format .py files with Ruff,
7) pytest: sleep(1) between tests,
9) add "Accept-Encoding" to HEADERS,
  • Loading branch information
deedy5 authored Nov 25, 2023
1 parent edbcced commit 8349f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion duckduckgo_search/duckduckgo_search_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def _get_vqd(self, keywords: str) -> Optional[str]:
async def _sleep(self) -> None:
"""Sleep between API requests if proxies is None."""
if self.proxies is None:
asyncio.sleep(0.75)
await asyncio.sleep(0.75)

async def text(
self,
Expand Down
2 changes: 1 addition & 1 deletion duckduckgo_search/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.9.7"
__version__ = "3.9.8"

0 comments on commit 8349f9d

Please sign in to comment.