mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.56k stars 947 forks source link

NoneType object has no attribute 'partition' #773

Closed Metichi closed 4 years ago

Metichi commented 4 years ago

Cloudflare seems to be at it again.

Doing as the error message told me to and posting the --verbose output ( gallery-mangadl is just an alias for gallery-dl --exec 'something' )

gallery-mangadl https://kissmanga.com/Manga/Dungeon-Meshi/Ch-064----Rabbit?id=621113 --verbose [gallery-dl][debug] Version 1.13.6 [gallery-dl][debug] Python 3.8.2 - Linux-5.4.0-31-generic-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/Dungeon-Meshi/Ch-064----Rabbit?id=621113' [kissmanga][debug] Using KissmangaChapterExtractor for 'https://kissmanga.com/Manga/Dungeon-Meshi/Ch-064----Rabbit?id=621113' [urllib3.connectionpool][debug] Starting new HTTPS connection (1): kissmanga.com:443 [urllib3.connectionpool][debug] https://kissmanga.com:443 "GET /Manga/Dungeon-Meshi/Ch-064----Rabbit?id=621113 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 49, in run for msg in self.extractor: File "/usr/local/lib/python3.8/dist-packages/gallery_dl/extractor/common.py", line 343, in items page = self.request(self.gallery_url, notfound=self.subcategory).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 106, 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'

kattjevfel commented 4 years ago

This is probably fixed by d17e9628b312da15335cdb50bd5d93fd8c2e538d, but isn't included in the current latest release, please try using the latest development version.

(works fine here)

EDIT: Tried with stable version, broke. So yeah 100% need to update to latest dev version.