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

Sankaku suddenly stopped downloading #7071

Closed
UpscaleAnon opened this issue Feb 27, 2025 · 4 comments
Closed

Sankaku suddenly stopped downloading #7071

UpscaleAnon opened this issue Feb 27, 2025 · 4 comments

Comments

@UpscaleAnon
Copy link

It worked completely fine until about 40 minutes ago where gallery-dl just spits out this error:
[sankaku][warning] Unable to fetch download URL for post JbagooV0YaQ (md5: cda0c835c6ce3a0a0cf394456beecb95)
[sankaku][warning] Unable to fetch download URL for post XEa1llYJNMq (md5: f2db05fba8f1fff12d4715fe8664cabb)
[sankaku][warning] Unable to fetch download URL for post 9PMwppDYwaB (md5: dff20dd13777d4942d72dfccfe9d46ca)
[sankaku][warning] Unable to fetch download URL for post b8aJjj6EBa2 (md5: e491287b102eba74f089e8e2a78bd6e2)
[sankaku][warning] Unable to fetch download URL for post JbagooVy5aQ (md5: 811090afa838461513c6e34d52d541fa)
[sankaku][warning] Unable to fetch download URL for post 09azvv1wkak (md5: 06fe02408cd6a798c932030c18064192)
[sankaku][warning] Unable to fetch download URL for post 9krZJd95krg (md5: 647214815b995692818957292145ac06)
[sankaku][warning] Unable to fetch download URL for post 1QaE9ylxa9L (md5: 52b925541a332762d9253c22ec203d59)
[sankaku][warning] Unable to fetch download URL for post 1QaEpAWBM9L (md5: 00a658f8dde044b2b9294379c4988ac8)

Here's verbose output:
gallery-dl --verbose https://chan.sankakucomplex.com/en/posts/LbaWXbvG2ro
[gallery-dl][debug] Version 1.28.5 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files ['D:\SankakuDownloader\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://chan.sankakucomplex.com/en/posts/LbaWXbvG2ro'
[sankaku][debug] Using SankakuPostExtractor for 'https://chan.sankakucomplex.com/en/posts/LbaWXbvG2ro'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): capi-v2.sankakucomplex.com:443
[urllib3.connectionpool][debug] https://capi-v2.sankakucomplex.com:443 "GET /posts?lang=en&page=1&limit=1&tags=id_range%3ALbaWXbvG2ro HTTP/11" 200 None
[sankaku][debug] KeyError: 'file_url'
[sankaku][warning] Unable to fetch download URL for post LbaWXbvG2ro (md5: 17b7d61899dace56dcdc431919908f05)
[sankaku][info] No results for https://chan.sankakucomplex.com/en/posts/LbaWXbvG2ro

Everything works fine in my browser and it's failing previously downloaded images so it's not image specific or anything.
I was on version 1.28.4 and updated just now to 1.28.5 but that changed nothing.

@TheCrimsondev TheCrimsondev marked this as a duplicate of #7072 Feb 27, 2025
@ImVantexHD
Copy link

hmm, i thought that i was rate limited but it seems it's not just me, probably just a site change

i can retrive the file url from the api just fine: https://capi-v2.sankakucomplex.com/posts?lang=en&page=1&limit=1&tags=id_range%3ALbaWXbvG2ro so it shouldn't be hard to fix

@taskhawk
Copy link

taskhawk commented Feb 27, 2025

Despite the file url being present when testing the API in the browser, I noticed the JSON received by gallery-dl didn't include it. So checking the differences and a bit of testing, if you remove the Platform header from the request, it starts working again.

self.headers = {
"Accept" : "application/vnd.sankaku.api+json;v=2",
"Platform" : "web-app",
"Api-Version": None,
"Origin" : extractor.root,
}

mikf added a commit that referenced this issue Feb 28, 2025
omit 'Platform: web-app' API header to get sankaku to include
'file_url' data in API responses again
@mikf mikf closed this as completed Feb 28, 2025
@mikf mikf pinned this issue Feb 28, 2025
@Deejay85
Copy link

Deejay85 commented Mar 1, 2025

self.headers = {
"Accept" : "application/vnd.sankaku.api+json;v=2",
"Platform" : "web-app",
"Api-Version": None,
"Origin" : extractor.root,
}

How do I edit the file? All I got is a config file and a gallery-dl.exe. If there is a step-by-step guide to get this work again please let me know.

@taskhawk
Copy link

taskhawk commented Mar 2, 2025

I edited the Python source files of my gallery-dl installation in Linux because they are run directly like that. In Windows the .exe file is a compiled form of the Python files and that's not easily modified, you would need to gather the source files, make the change(s) and recompile them into the .exe file.

But, the latest version was just released and it includes the fix, so just update to v1.29.0 and it should work for you again.

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

5 participants