mikf / gallery-dl

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

Furaffinity error [downloader.http][warning] '403 Forbidden' for images #3926

Open spectrefps opened 1 year ago

spectrefps commented 1 year ago

When trying to use it for images (even individual) for Furaffinity, I am getting the " [downloader.http][warning] '403 Forbidden' " error. I have my config file set up with my username/pw, as well as my "a" and "b" cookies. Am I missing something else?

mikf commented 1 year ago

Works on my machine :tm:, with and without cookies

$ gallery-dl https://www.furaffinity.net/view/21835115/
/tmp/_/furaffinity/mirlinthloth/21835115 Bude's 4 Ever.mp3

Maybe your IP or the entire IP range got (temporarily) blocked for some reason? Can you access FA download links in browser? (https://d.furaffinity.net/download/art/mirlinthloth/music/1488278723/1480267446.mirlinthloth_dj_fennmink_-_bude_s_4_ever.mp3)

spectrefps commented 1 year ago

I -can't- access that link in my browser (what would cause that?), and can't seem to get it to download using gallery-dl (says "unsupported URL"). For the gallery I am trying to download, I found a buggy workaround: by adding a "headers" entry under the Downloader > http section of the config file,

"headers": {"Accept": "image/png,*/*", "Referer": "https://www.furaffinity.net/"

I was able to get it to at least download images as jpgs. HOWEVER, there are a number of images that should download as PNGs (when you hit download and it takes you to a full-size view of the image, it's a png according to the image URL, and choosing "save as" saves it as a png). However, both gallery and individual URLs in gallery-dl result in only JPGs.

How would I make it download PNGs as PNGs instead of downloading everything as JPGs?

mikf commented 1 year ago

Disable downloader.http.adjust-extensions

A lot of PNG files on FA are actually JPEGs with a wrong filename extension. By default, gallery-dl checks that and changes extensions accordingly.


I found a buggy workaround: by adding a "headers" entry

What headers did you use?

spectrefps commented 1 year ago

Oh wow! I did not know that! So the 'original' file is infact a JPG all along... If that's the case, then I likely don't want to make it download in the wrong format.

I used "image/png" in that headers line. And thank you for the advice to change/disable the 'adjust-extensions' setting!

Also, since I can't access that link you provided (in my browser), that means there is some partial block/restriction on FA? I am able to access all of the images in the gallery I am searching (including the 'download' image/url when you click the "Download" button). However, I wasn't able to access that specific link you posted.

mikf commented 1 year ago

Also, since I can't access that link you provided (in my browser), that means there is some partial block/restriction on FA?

Probably. I can just copy-paste that link in my browser's URL bar and it downloads.

I am able to access all of the images in the gallery I am searching (including the 'download' image/url when you click the "Download" button)

Then maybe a Referer header would help. (The furaffinity extractors do not send one by default)

"headers": {
    "Referer": "https://www.furaffinity.net/"
}

Alternatively, you could try "browser": "firefox" without setting downloader.headers to have it use the same headers as a regular browser, including Accept.

ringtailedfox commented 1 year ago

I can reproduce this error.

This happened to me while signed in to NordVPN... perhaps that could be causing the HTTP 403 errors? it works just fine when i turn NordVPN off...