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

Kissmanga: An unexpected error occurred: AttributeError - 'NoneType' object has no attribute 'partition'. #757

Closed
arisboch opened this issue May 15, 2020 · 1 comment

Comments

@arisboch
Copy link

When I tried to download a manga series via the URL https://kissmanga.com/Manga/Kiniro-Mosaic , it gave me the following error message:

[gallery-dl][debug] Version 1.14.0-dev
[gallery-dl][debug] Python 3.8.2 - Linux-4.4.0-18362-Microsoft-x86_64-with-glibc2.29
[gallery-dl][debug] requests 2.22.0 - urllib3 1.25.8
[gallery-dl][debug] Starting DownloadJob for 'https://kissmanga.com/Manga/Kiniro-Mosaic'
[kissmanga][debug] Using KissmangaMangaExtractor for 'https://kissmanga.com/Manga/Kiniro-Mosaic'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): kissmanga.com:443
[urllib3.connectionpool][debug] https://kissmanga.com:443 "GET /Manga/Kiniro-Mosaic HTTP/1.1" 503 None
[kissmanga][info] Solving Cloudflare challenge
[kissmanga][error] An unexpected error occurred: AttributeError - 'NoneType' object has no attribute 'partition'. 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 "/usr/local/lib/python3.8/dist-packages/gallery_dl/job.py", line 55, in run
    for msg in self.extractor:
  File "/usr/local/lib/python3.8/dist-packages/gallery_dl/extractor/common.py", line 430, in items
    page = self.request(self.manga_url).text
  File "/usr/local/lib/python3.8/dist-packages/gallery_dl/extractor/kissmanga.py", line 24, in request
    response = Extractor.request(self, url, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/gallery_dl/extractor/common.py", line 109, in request
    response, domain, cookies = cloudflare.solve_challenge(
  File "/usr/local/lib/python3.8/dist-packages/gallery_dl/cloudflare.py", line 47, in solve_challenge
    value = solve_js_challenge(page, parsed.netloc)
  File "/usr/local/lib/python3.8/dist-packages/gallery_dl/cloudflare.py", line 100, in solve_js_challenge
    value = evaluate_expression(expr[vlength+2:], page, netloc)
  File "/usr/local/lib/python3.8/dist-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'

I tried a few others such as these (by random):

https://kissmanga.com/Manga/Talk-to-Me
https://kissmanga.com/Manga/Cat-Eared-Girl
https://kissmanga.com/Manga/Yubisaki-Milk-Tea
https://kissmanga.com/Manga/Dramatic-Irony--Namaco

To no avail, all of them produce the same error message.

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

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

@mikf mikf closed this as completed May 18, 2020
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

2 participants