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

[Patreon][error] JSONDecodeError, cannot download #4569

Closed
MarqFJA87 opened this issue Sep 22, 2023 · 3 comments
Closed

[Patreon][error] JSONDecodeError, cannot download #4569

MarqFJA87 opened this issue Sep 22, 2023 · 3 comments

Comments

@MarqFJA87
Copy link

MarqFJA87 commented Sep 22, 2023

I keep getting a JSONDecodeError download failure whenever I plug in a Patreon link; I face no problems with other domains. Below is an example log; the link is SFW, to be clear.

D:\Programs\Bulk downloaders\gallery-dl>gallery-dl https://www.patreon.com/posts/lazulightpp-89659199 --verbose
[gallery-dl][debug] Version 1.25.8
[gallery-dl][debug] Python 3.10.0 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 1.26.7
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.patreon.com/posts/lazulightpp-89659199'
[patreon][debug] TLS 1.2 disabled.
[patreon][debug] Using PatreonPostExtractor for 'https://www.patreon.com/posts/lazulightpp-89659199'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.patreon.com:443
[urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /posts/lazulightpp-89659199 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 "D:\Programs\Python\Python310\lib\site-packages\gallery_dl\job.py", line 96, in run
    for msg in extractor:
  File "D:\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\patreon.py", line 38, in items
    for post in self.posts():
  File "D:\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\patreon.py", line 372, in posts
    post = self._extract_bootstrap(page)["post"]
  File "D:\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\patreon.py", line 253, in _extract_bootstrap
    return util.json_loads(text.extr(
  File "D:\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\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)
@mikf
Copy link
Owner

mikf commented Sep 22, 2023

Duplicate of #4547

@biggestsonicfan
Copy link

Seeing something similar on current dev branch:

gallery-dl: Version 1.26.2-dev
gallery-dl: Python 3.11.5 - Linux-6.5.8-1-default-x86_64-with-glibc2.38
gallery-dl: requests 2.31.0 - urllib3 2.0.7
gallery-dl: Configuration Files ['${HOME}/.gallery-dl.conf']
gallery-dl: Starting DownloadJob for 'https://www.patreon.com/XYZ'
patreon: Using PatreonCreatorExtractor for 'https://www.patreon.com/XYZ'
patreon: TLS 1.2 disabled.
patreon: Loading cookies from '/home/NAME/gallery-dl/cookies/patreon.txt'
urllib3.connectionpool: Starting new HTTPS connection (1): www.patreon.com:443
urllib3.connectionpool: https://www.patreon.com:443 "GET /landidzu/posts HTTP/1.1" 301 None
urllib3.connectionpool: https://www.patreon.com:443 "GET /Landidzu/posts HTTP/1.1" 200 None
patreon: None
patreon: Unable to extract campaign ID (JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@biggestsonicfan
Copy link

Fixed with #4738

@mikf mikf closed this as completed Oct 30, 2023
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