You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a cron scrapping images from DuckDuckGo while suddenly stopped with the following error:
Traceback (most recent call last):
File "/path/to/jmd_imagescraper/core.py", line 211, in duckduckgo_search
links = duckduckgo_scrape_urls(keywords, max_results, img_size, img_type, img_layout, img_color)
File "/path/to/jmd_imagescraper/core.py", line 82, in duckduckgo_scrape_urls
assert match is not None, "Failed to obtain search token"
AssertionError: Failed to obtain search token
This was caused as DuckDuckGo returned a non-valid answer for https://duckduckgo.com/418.htm , which then was unable to obtain the token. I also saw other users of your library that obtained that error suddenly but they did not reported that.
This issue can be easily be solved at adding any user agent at that inital request. Here is my suggestion:
I had a cron scrapping images from DuckDuckGo while suddenly stopped with the following error:
This was caused as DuckDuckGo returned a non-valid answer for https://duckduckgo.com/418.htm , which then was unable to obtain the token. I also saw other users of your library that obtained that error suddenly but they did not reported that.
This issue can be easily be solved at adding any user agent at that inital request. Here is my suggestion:
Tested that and worked again.
The text was updated successfully, but these errors were encountered: