deepanprabhu / duckduckgo-images-api

DuckDuckGo Image Search Resuts - Programatically download Image Search Results
The Unlicense
84 stars 24 forks source link

other params you can use with i.js ? #11

Closed joedockrill closed 4 years ago

joedockrill commented 4 years ago

hi,

sorry to bother you here but do you know if it's documented anywhere which params i can use with i.js??

i want to be able to restrict searches to square images, certain colors, only photos etc like you can on the ddg gui. i can't find any documentation anywhere. where did you originally find it?

deepanprabhu commented 4 years ago

Hi @joedockrill , Yeah so its an unofficial api, so no documentation. Most of the code was written through introspection. I don't have the above features yet, but if you do implement, please share a PR.

joedockrill commented 4 years ago

If it's possible to feed those parameters in I certainly will.

deepanprabhu commented 4 years ago

Thanks @joedockrill , Currently i dont have bandwidth as well, but if i get let me surely include them in the next version.

joedockrill commented 4 years ago

Bro,

the param is 'f' and the format is 'size:blah,type:blah,layout:blah,color:blah' like ',type:photo,layout:Square,color:Monochrome'

See this notebook, duckduckgo_scrape_urls() now takes a bunch of constraint params and there are enums defined just above for all the values which ddg accepts.

deepanprabhu commented 4 years ago

Thanks @joedockrill

deepanprabhu commented 4 years ago

Would encourage you to submit a PR, @joedockrill .