From 4cf3d54718812ae2bcf6cd5ee39347409946921e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 12 Jun 2020 00:41:49 +0200 Subject: [PATCH] [kissmanga] workaround for CAPTCHAs (fixes #818) Requesting the same page again when being redirected to a CAPTCHA lets us access that page without solving it. --- gallery_dl/extractor/kissmanga.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/gallery_dl/extractor/kissmanga.py b/gallery_dl/extractor/kissmanga.py index 348453d7..ade245bc 100644 --- a/gallery_dl/extractor/kissmanga.py +++ b/gallery_dl/extractor/kissmanga.py @@ -9,9 +9,10 @@ """Extract manga-chapters and entire manga from https://kissmanga.com/""" from .common import ChapterExtractor, MangaExtractor, Extractor -from .. import text, aes, exception +from .. import text, aes from ..cache import cache import hashlib +import time import ast import re @@ -24,18 +25,7 @@ class RedirectMixin(): response = Extractor.request(self, url, **kwargs) if not response.history or "/AreYouHuman" not in response.url: return response - if self.config("captcha", "stop") == "wait": - self.log.warning( - "Redirect to \n%s\nVisit this URL in your browser, solve " - "the CAPTCHA, and press ENTER to continue", response.url) - try: - input() - except (EOFError, OSError): - pass - else: - raise exception.StopExtraction( - "Redirect to \n%s\nVisit this URL in your browser and " - "solve the CAPTCHA to continue", response.url) + time.sleep(2) class KissmangaBase(RedirectMixin):