diff options
| author | 2020-12-13 23:07:42 -0500 | |
|---|---|---|
| committer | 2020-12-13 23:07:42 -0500 | |
| commit | 8f7c87a2697113134c311aaeafd9c919555a2741 (patch) | |
| tree | 4ff7316ac1570683b3c968fd30d044925e47a2a5 /gallery_dl/extractor/webtoons.py | |
| parent | 143723944033d7a6593d57bd1cf6ae97713b6ce7 (diff) | |
New upstream version 1.16.0.upstream/1.16.0
Diffstat (limited to 'gallery_dl/extractor/webtoons.py')
| -rw-r--r-- | gallery_dl/extractor/webtoons.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gallery_dl/extractor/webtoons.py b/gallery_dl/extractor/webtoons.py index 55324cb..a3dc6a0 100644 --- a/gallery_dl/extractor/webtoons.py +++ b/gallery_dl/extractor/webtoons.py @@ -11,7 +11,6 @@ from .common import Extractor, Message from .. import exception, text, util - BASE_PATTERN = r"(?:https?://)?(?:www\.)?webtoons\.com/((en|fr)" @@ -22,10 +21,18 @@ class WebtoonsExtractor(Extractor): def __init__(self, match): Extractor.__init__(self, match) - self.session.cookies.set("ageGatePass", "true", - domain=self.cookiedomain) self.path, self.lang, self.genre , self.comic, self.query = \ match.groups() + cookies = self.session.cookies + cookies.set("pagGDPR", "true", domain=self.cookiedomain) + cookies.set("ageGatePass", "true", domain=self.cookiedomain) + + def request(self, url, **kwargs): + response = Extractor.request(self, url, **kwargs) + if response.history and "/ageGate" in response.request.url: + raise exception.StopExtraction( + "Redirected to age gate check ('%s')", response.request.url) + return response class WebtoonsEpisodeExtractor(WebtoonsExtractor): |
