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
932 stars 117 forks source link

TypeError: request() got an unexpected keyword argument 'follow_redirects' #112

Closed h9052300 closed 10 months ago

h9052300 commented 10 months ago

Describe the bug TypeError: request() got an unexpected keyword argument 'follow_redirects'

Debug log TypeError: request() got an unexpected keyword argument 'follow_redirects'

Specify this information

deedy5 commented 10 months ago

show the code where you got this error

h9052300 commented 10 months ago
from duckduckgo_search import DDGS

with DDGS() as ddgs:
    for r in ddgs.text('live free or die', region='wt-wt', safesearch='off', timelimit='y'):
        print(r)
deedy5 commented 10 months ago

I can't reproduce the problem. Try reinstalling the package.

pip install -I -U duckduckgo_search
IGamesI commented 9 months ago

I also get the same error using the sample provides in the text() section of the main documentation. Code:

from duckduckgo_search import DDGS

with DDGS(timeout=20) as ddgs:
    for r in ddgs.text("something you need"):
        print(r)

Output: TypeError: Client.request() got an unexpected keyword argument 'follow_redirects'

I can confirm that the package is installed and imported. It also happens when I do it from a us-based pythonanywhere server, so I don't think it's caused by my network or location

deedy5 commented 9 months ago

Thanks for participating. Please show me the result of this code.

import logging
from duckduckgo_search import DDGS, __version__

logging.basicConfig(level=logging.INFO)

print(__version__)
with DDGS(timeout=20) as ddgs:
    for r in ddgs.text("iii"):
        print(r)