mikf / gallery-dl

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

Flickr: "NotFoundError: Requested album could not be found" #648

Closed photologist closed 4 years ago

photologist commented 4 years ago

I'm getting "NotFoundError: Requested album could not be found" when trying to download this album:

https://www.flickr.com/photos/micmojo/albums/72157607615352157 (NSFW)

(Note: You need to be logged into flickr to access the album.)

Here's a sample of the image paths from a photo in the above album...

https://www.flickr.com/photos/micmojo/4458729957/in/album-72157607615352157/

-that page gets the image from: https://live.staticflickr.com/2737/4458729957_2a162e24cc_z.jpg

I've got an "access-token" and an "access-token-secret" set in my config file, but that doesn't seem to help.

I also tried "--username" and "--password", but gallery-dl still can't find the album online.

I have a feeling it's because the author of the album set it so that it cannot be seen by anyone who's not actually logged into their account and viewing via the browser.

This might be a stretch, but is there a way to "fool flickr into thinking" that the Terminal bash is "logged in" to the site, as if it were a browser?

Any help would be much appreciated.

mikf commented 4 years ago

Works for me with access-token and access-token-secret set:

$ gallery-dl https://www.flickr.com/photos/micmojo/albums/72157607615352157
/tmp/flickr/albums/72157607615352157 - nude/flickr_29674810744.jpg
/tmp/flickr/albums/72157607615352157 - nude/flickr_30584379485.jpg
/tmp/flickr/albums/72157607615352157 - nude/flickr_31398149281.jpg
...

but I get the same error without those tokens:

$ gallery-dl -o access-token= https://www.flickr.com/photos/micmojo/albums/72157607615352157
[flickr][error] NotFoundError: Requested album could not be found

I suspect there might be something wrong with your config file, its location, our your access token. Take a look at the output with --verbose. When all 4 OAuth tokens/secrets are set (default api-token and -secret & your own access-token and -secret from your config file), you should see [flickr][debug] Using default OAuth1.0 authentication

If for whatever reason your access tokens are missing, it'll only show [flickr][debug] Using default api_key authentication

I also tried "--username" and "--password", but gallery-dl still can't find the album online.

Authentication for Flickr is only implemented via OAuth. --username and --password don't work here.

photologist commented 4 years ago

@mikf Thanks for the quick response.

My installation of gallery-dl is here:

Macintosh HD/usr/local/Cellar/gallery-dl/1.13.2/...

My 'gallery-dl.config' file is here:

{macOS home folder}/.config/gallery-dl/gallery-dl.config

And "flickr" looks like this:

    {
        "access-token": "***",
        "access-token-secret": "***",
        "videos": true,
        "size-max": null
    },

I got the tokens via Terminal: $ gallery-dl oauth:flickr

I can't figure out what I'm doing wrong...

mikf commented 4 years ago

{macOS home folder}/.config/gallery-dl/gallery-dl.config

It needs to be at either

to be automatically recognized.

Renaming your file to config.json should do the trick.

photologist commented 4 years ago

@mikf Thanks again!

Changing the name/extension on this one did the trick:

{macOS home folder}/.config/gallery-dl/config.json