-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Patreon] JSONDecodeError #4736
Comments
I can confirm the bug:
|
Maybe already fixed in master? #4715 |
I installed the new master, now it says that it can't find the "campaign ID". |
Looks like Patreon change the JavaScript structure. The variable But in this var I can't find the substring "window.patreon.bootstrap," - I only similar data is
|
Found the bug |
https://github.com/mikf/gallery-dl/blob/master/gallery_dl/extractor/patreon.py#L253 must be changed from (or |
I created a PR |
Tobi823: I can confirm the patch works fine. Fixed my issue! Thanks! |
weibo also has this problem, when I download from weibo it show [weibo][error] Unable to download data: JSONDecodeError: Expecting value: line 2 column 3 (char 3) |
@liyiecho open a separate issue for this and post a |
I think this was because the site changed
verbose log:
[gallery-dl][debug] Version 1.26.1
[gallery-dl][debug] Python 3.10.6 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.25.1 - urllib3 1.26.12
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://www.patreon.com/posts/september-2023-91731970'
[patreon][debug] Using PatreonPostExtractor for 'https://www.patreon.com/posts/september-2023-91731970'
[patreon][debug] TLS 1.2 disabled.
[cookies][debug] Extracting cookies from C:\Users\123\AppData\Roaming\Mozilla\Firefox\Profiles\l91x86hv.default-release-1650697863926\cookies.sqlite
[cookies][info] Extracted 624 cookies from Firefox
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.patreon.com:443
[urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /posts/september-2023-91731970 HTTP/1.1" 200 None
[patreon][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[patreon][debug]
Traceback (most recent call last):
File "C:\Users\123\AppData\Local\Programs\Python\Python310\lib\site-packages\gallery_dl\job.py", line 124, in run
for msg in extractor:
File "C:\Users\123\AppData\Local\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\patreon.py", line 38, in items
for post in self.posts():
File "C:\Users\123\AppData\Local\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\patreon.py", line 327, in posts
post = self._extract_bootstrap(page)["post"]
File "C:\Users\123\AppData\Local\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\patreon.py", line 252, in _extract_bootstrap
return util.json_loads(text.extr(
File "C:\Users\123\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\123\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered: