sybrenstuvel / flickrapi

Python Flickr API implementation
https://stuvel.eu/flickrapi
Other
155 stars 33 forks source link

flickr.photos.search: tag_mode #96

Closed ydnaandy123 closed 6 years ago

ydnaandy123 commented 6 years ago

https://www.flickr.com/services/api/flickr.photos.search.html says we can set 'tag_mode': Either 'any' for an OR combination of tags, or 'all' for an AND combination. Defaults to 'any' if not specified.

But when I used

flickr.photos.search(tags=['bird, 'dof'], tag_mode='all', media='photos')

I got same results no matter what 'tag_mode' I set. I always get the AND combination as default value='any'. Any idea about that? Did I miss something? The result I want should looks like

flickr.photos.search(text='bird dof', media='photos')

Anyway this is a very nice and convenient tool! Thanks for sharing~

sybrenstuvel commented 6 years ago

According to the documentation, the tags parameter must be a "comma-delimited list of tags". This means that you cannot pass it either a list or a space-separated string. Have you tried tags='bird,dof' instead?

sybrenstuvel commented 6 years ago

Closing this issue due to inactivity.