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
1.12k stars 131 forks source link

After a number of requests ddg returns an empty list #38

Closed eulenleber closed 1 year ago

eulenleber commented 1 year ago

ref https://github.com/deedy5/duckduckgo_search/issues/35 Lets track that here:

import duckduckgo_search
a=True
i=0
while a:
    a=duckduckgo_search.ddg('"test test"')
    print(f"{i} {len(a)}")
    i+=1

returns eventually [] b.c. duckduckgo returns

window.execDeep=function(){return{is506:1,bn:{ivc:1,ibc:0}};};
deedy5 commented 1 year ago

if the max_results parameter is not specified and an exception occurs when requesting the api, it will return None. Fixed in v2.8.3. Please update and retray.

pip install -U duckduckgo_search