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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

h9052300 opened this issue · comments

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

  • OS: Win 11
  • environment python 3.9
  • duckduckgo_search version 3.8.5
commented

show the code where you got this error

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)
commented

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

pip install -I -U duckduckgo_search

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

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)