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
Folder name error when using site: example.example.com for image download #49
Downloading the package through pip
pip install -U
Use the ddg_image module with the following query keeping parameter download =True
keyword = 'bangladeshi 100 taka note site:en.numista.com'
r = ddg_images(keywords=keyword,safesearch='off',layout='Wide',max_results=50,size='Large',download=True)
print(r)
Stack Track of error :
File "D:\Folder\duck_duck_go_scraper.py", line 15, in <module>
main()
File "D:\Folder\duck_duck_go_scraper.py", line 11, in main
r = ddg_images(keywords=keyword,safesearch='off',layout='Wide',max_results=50,size='Large',download=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Folder\venv\Lib\site-packages\duckduckgo_search\ddg_images.py", line 143, in ddg_images
os.makedirs(path, exist_ok=True)
File "<frozen os>", line 225, in makedirs
NotADirectoryError: [WinError 267] The directory name is invalid: 'ddg_images_bangladeshi 100 taka note site:en.numista.com_20230415_120129'
To reproduce the error
Downloading the package through pip
pip install -U
Use the ddg_image module with the following query keeping parameter
download =True
Stack Track of error :