Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fantia currently broken, requires header #4273

Closed
thatfuckingbird opened this issue Jul 6, 2023 · 2 comments
Closed

Fantia currently broken, requires header #4273

thatfuckingbird opened this issue Jul 6, 2023 · 2 comments

Comments

@thatfuckingbird
Copy link
Contributor

thatfuckingbird commented Jul 6, 2023

Started getting HTTP error code 422 on their /posts API endpoint.
Looks like they require an X-Requested-With header now with value "XMLHttpRequest".
As a workaround until this is added in the fantia extractor, the following config works:

        "fantia": {
            "headers":{
                "x-requested-with": "XMLHttpRequest"
            }
        } 
@appleshape
Copy link

appleshape commented Jul 7, 2023

I've added the headers to my config and I now get a 404:

$ .\gallery-dl.exe --cookies .\cookies.txt "https://fantia.jp/fanclubs/191767"
[fantia][error] HttpError: '404 Not Found' for 'https://fantia.jp/fanclubs/191767/posts'

Note that downloading a single post works fine:

$ .\gallery-dl.exe --cookies .\cookies.txt https://fantia.jp/posts/2017505
# .\gallery-dl\fantia\191767\2017505_thumb.jpg
# .\gallery-dl\fantia\191767\2017505_13465252.jpg
[fantia][warning] Unable to download 'uncatchable' files from https://fantia.jp/posts/2017505#post-content-id-3360150 // expected
[fantia][warning] Unable to download 'uncatchable' files from https://fantia.jp/posts/2017505#post-content-id-3360151 // expected

Details: Windows, 1.25.7.0, pre-built .exe from releases.

@thatfuckingbird
Copy link
Contributor Author

I've added the headers to my config and I now get a 404:

$ .\gallery-dl.exe --cookies .\cookies.txt "https://fantia.jp/fanclubs/191767"
[fantia][error] HttpError: '404 Not Found' for 'https://fantia.jp/fanclubs/191767/posts'

Note that downloading a single post works fine:

$ .\gallery-dl.exe --cookies .\cookies.txt https://fantia.jp/posts/2017505
# .\gallery-dl\fantia\191767\2017505_thumb.jpg
# .\gallery-dl\fantia\191767\2017505_13465252.jpg
[fantia][warning] Unable to download 'uncatchable' files from https://fantia.jp/posts/2017505#post-content-id-3360150 // expected
[fantia][warning] Unable to download 'uncatchable' files from https://fantia.jp/posts/2017505#post-content-id-3360151 // expected

Details: Windows, 1.25.7.0, pre-built .exe from releases.

Ugh, you're right. With the header added, it returns 404. Without the header it works fine, but then the individual posts are broken... So it appears the header must only be set for the API endpoint, but not for the page listing posts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants