[mangasee] use randomly generated PHPSESSID cookie (#2560)
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
"""Extractors for https://mangasee123.com/"""
|
"""Extractors for https://mangasee123.com/"""
|
||||||
|
|
||||||
from .common import ChapterExtractor, MangaExtractor
|
from .common import ChapterExtractor, MangaExtractor
|
||||||
from .. import text
|
from .. import text, util
|
||||||
import json
|
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):
|
def metadata(self, page):
|
||||||
extr = text.extract_from(page)
|
extr = text.extract_from(page)
|
||||||
self.chapter = data = json.loads(extr("vm.CurChapter =", ";\r\n"))
|
self.chapter = data = json.loads(extr("vm.CurChapter =", ";\r\n"))
|
||||||
|
|||||||
Reference in New Issue
Block a user