mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.69k stars 954 forks source link

Flickr metadata doesn’t include license information? #4227

Closed manu-cyber closed 1 year ago

manu-cyber commented 1 year ago

I’m wondering why the metadata json file does not include the license information displayed on the picture’s page. Is it scraped for another source? Is flickr unique in providing that information compared to other galeries?

If it’s just a matter of implementation, where would I have to look in order to add this information? :)

mikf commented 1 year ago

For Flickr, all data is gotten from its API. To get more metadata like license, you can add its name to the entries here https://github.com/mikf/gallery-dl/blob/23469837cd58a5316843ab9efe2c9549d5e58b9b/gallery_dl/extractor/flickr.py#L454-L455

manu-cyber commented 1 year ago

I just took a look at your commit and I would have taken ages for that, thank you so much ^^

Also, am I right in assuming I would need a flickr account for developing, since I seem to require an API token?

mikf commented 1 year ago

This code is just an adjusted copy-paste of the same concept for Danbooru, so it wasn't nearly as complicated as it might appear.

Regarding API tokens, gallery-dl has a built-in one for Flickr which I registered a couple years ago on a free account.