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

Syntax error in v2.9.4 #58

Closed VineethK336 closed 1 year ago

VineethK336 commented 1 year ago

Hello!

I noticed a syntax error upon trying to use the v2.9.4 version of the library. The error I faced: Screenshot 2023-05-12 at 10 50 37 PM

The issue is in an fstring mentioned below. The = inside the interpolation is causing the issue.

The line in the code causing the issue: https://github.com/deedy5/duckduckgo_search/blob/main/duckduckgo_search/ddg.py#L60

deedy5 commented 1 year ago

Yes, you're right. This appeared in python 3.8 https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging

deedy5 commented 1 year ago

Fixed in https://github.com/deedy5/duckduckgo_search/pull/59 Please update to v2.9.5 pip install -U duckduckgo_search

VineethK336 commented 1 year ago

Thank you for the quick resolution!