Code Monkey home page Code Monkey logo

duckduckgoimages's People

Contributors

jorgepoblete avatar nachimak28 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

duckduckgoimages's Issues

May require new example code

The current example code fails at run. Previous versions worked OK. The options don't seem to work properly.

Message 'ValueError: not enough values to unpack (expected 2, got 0)

[Feature Request] License option

Hi, I really love this very easy to use library you created!

Is there any chance you could add an option for image license type? I'd like to only download images that are free for commercial use.

Any query ends up with: ValueError: not enough values to unpack (expected 2, got 0)

Seems that Duck changed something, and any query ends up with this error:

import DuckDuckGoImages as ddg
ddg.download('kittens')

Traceback (most recent call last):
File "", line 1, in
File "/home/k/lib/python3.9/site-packages/DuckDuckGoImages.py", line 57, in download
urls = get_image_urls(query, license, safe_search)
File "/home/k/lib/python3.9/site-packages/DuckDuckGoImages.py", line 106, in get_image_urls
return _fetch_search_urls(query, token, license, safe_search)
File "/home/k/lib/python3.9/site-packages/DuckDuckGoImages.py", line 136, in _fetch_search_urls
_urls, next = _get_urls(f"{URL}i.js", query, what)
ValueError: not enough values to unpack (expected 2, got 0)

Version: 2.0.8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.