diff options
| author | 2022-05-26 23:57:04 -0400 | |
|---|---|---|
| committer | 2022-05-26 23:57:04 -0400 | |
| commit | ad61a6d8122973534ab63df48f6090954bc73db6 (patch) | |
| tree | aedce94427ac95fa180005f88fc94b5c8ef5a62a /gallery_dl/extractor/mangasee.py | |
| parent | c6b88a96bd191711fc540d7babab3d2e09c68da8 (diff) | |
New upstream version 1.22.0.upstream/1.22.0
Diffstat (limited to 'gallery_dl/extractor/mangasee.py')
| -rw-r--r-- | gallery_dl/extractor/mangasee.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gallery_dl/extractor/mangasee.py b/gallery_dl/extractor/mangasee.py index 0b0da65..2bd11ef 100644 --- a/gallery_dl/extractor/mangasee.py +++ b/gallery_dl/extractor/mangasee.py @@ -9,7 +9,7 @@ """Extractors for https://mangasee123.com/""" from .common import ChapterExtractor, MangaExtractor -from .. import text +from .. import text, util import json @@ -57,6 +57,15 @@ class MangaseeChapterExtractor(MangaseeBase, ChapterExtractor): }, }) + def __init__(self, match): + ChapterExtractor.__init__(self, match) + self.session.headers["Referer"] = self.gallery_url + + domain = "mangasee123.com" + cookies = self.session.cookies + if not cookies.get("PHPSESSID", domain=domain): + cookies.set("PHPSESSID", util.generate_token(13), domain=domain) + def metadata(self, page): extr = text.extract_from(page) self.chapter = data = json.loads(extr("vm.CurChapter =", ";\r\n")) |
