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

Date range in searches #86

Closed migcm closed 1 year ago

migcm commented 1 year ago

Thank you very much for your project and the time you have dedicated to it. I find it both interesting and highly useful.

I have a small suggestion regarding the search functionality. It would be great if you could consider adding the option to include a time interval for searches. For instance, when using duckduckgo.com, the date limitation is achieved by including the "df" parameter in the URL: &df=YYYYYY-MM-DD..YYYYY-MM-DD

For example: https://duckduckgo.com/?q=test&df=2023-05-15..2023-05-18

Would it be possible to incorporate this feature into your project?

Once again, thank you for your exceptional work.

deedy5 commented 1 year ago
from duckduckgo_search import DDGS

with DDGS() as ddgs:
    for r in ddgs.text('something', region='ve-es', safesearch='Off', timelimit="2023-01-01..2023-01-10"):
        print(r)