[mangasee] use randomly generated PHPSESSID cookie (#2560)
This commit is contained in:
parent
4c47dfffdd
commit
f190018e37
@ -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"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user