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

Unexpected error KeyError -'+(!!' #728

Closed
Metichi opened this issue May 2, 2020 · 3 comments
Closed

Unexpected error KeyError -'+(!!' #728

Metichi opened this issue May 2, 2020 · 3 comments

Comments

@Metichi
Copy link

Metichi commented May 2, 2020

I am trying to download a manga from kissmanga and I run into this error and get told to report it here.
Im using the gallery-dl standalone executable v1.13.5 on ubuntu 20.04

Here is the output

gallery-dl https://kissmanga.com/Manga/Dungeon-Meshi/Ch-063----Confit?id=610531 --verbose
[gallery-dl][debug] Version 1.13.5
[gallery-dl][debug] Python 3.8.2 - Linux-5.4.0-28-generic-x86_64-with-glibc2.4
[gallery-dl][debug] requests 2.23.0 - urllib3 1.25.8
[gallery-dl][debug] Starting DownloadJob for 'https://kissmanga.com/Manga/Dungeon-Meshi/Ch-063----Confit?id=610531'
[kissmanga][debug] Using KissmangaChapterExtractor for 'https://kissmanga.com/Manga/Dungeon-Meshi/Ch-063----Confit?id=610531'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): kissmanga.com:443
[urllib3.connectionpool][debug] https://kissmanga.com:443 "GET /Manga/Dungeon-Meshi/Ch-063----Confit?id=610531 HTTP/1.1" 503 None
[kissmanga][info] Solving Cloudflare challenge
[kissmanga][error] An unexpected error occurred: KeyError - '+(!!'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[kissmanga][debug] 
Traceback (most recent call last):
  File "gallery_dl/job.py", line 49, in run
  File "gallery_dl/extractor/common.py", line 343, in items
  File "gallery_dl/extractor/kissmanga.py", line 24, in request
  File "gallery_dl/extractor/common.py", line 106, in request
  File "gallery_dl/cloudflare.py", line 47, in solve_challenge
  File "gallery_dl/cloudflare.py", line 88, in solve_js_challenge
  File "gallery_dl/cloudflare.py", line 130, in evaluate_expression
  File "gallery_dl/cloudflare.py", line 148, in evaluate_expression
  File "gallery_dl/cloudflare.py", line 149, in <genexpr>
KeyError: '+(!!'
@mikf
Copy link
Owner

mikf commented May 2, 2020

Thanks for reporting. Should be fixed in the new release (commit 714566b)

@mikf mikf closed this as completed May 2, 2020
@ImportTaste
Copy link
Contributor

I'm having a similar error today, also from kissmanga. Tried updating to the latest dev version and it didn't help. Was working fine on a few days ago.

Traceback (most recent call last):
  File "c:\python37\lib\site-packages\gallery_dl\job.py", line 55, in run
    for msg in self.extractor:
  File "c:\python37\lib\site-packages\gallery_dl\extractor\common.py", line 430, in items
    page = self.request(self.manga_url).text
  File "c:\python37\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 24, in request
    response = Extractor.request(self, url, **kwargs)
  File "c:\python37\lib\site-packages\gallery_dl\extractor\common.py", line 110, in request
    session, response, kwargs)
  File "c:\python37\lib\site-packages\gallery_dl\cloudflare.py", line 47, in solve_challenge
    value = solve_js_challenge(page, parsed.netloc)
  File "c:\python37\lib\site-packages\gallery_dl\cloudflare.py", line 100, in solve_js_challenge
    value = evaluate_expression(expr[vlength+2:], page, netloc)
  File "c:\python37\lib\site-packages\gallery_dl\cloudflare.py", line 123, in evaluate_expression
    return evaluate_expression(e.partition(">")[2], page, netloc)
AttributeError: 'NoneType' object has no attribute 'partition'

mikf added a commit that referenced this issue May 18, 2020
- support changing values for 'k'
- use XML parser to get request parameters
  (some input fields are now embedded in an HTML comment)
@mikf
Copy link
Owner

mikf commented May 18, 2020

@ImportTaste Cloudflare changed its "Checking your browser before accessing kissmanga.com" challenge again. Should be fixed with d17e962

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

No branches or pull requests

3 participants