[readcomiconline] update deobfuscation code (#2481)

This commit is contained in:
Mike Fährmann 2022-05-17 10:52:45 +02:00
parent 4005171db3
commit 82c1cc130b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -24,6 +24,7 @@ class ReadcomiconlineBase():
archive_fmt = "{issue_id}_{page}"
root = "https://readcomiconline.li"
browser = "firefox"
request_interval = (1, 9)
def request(self, url, **kwargs):
"""Detect and handle redirects to CAPTCHA pages"""
@ -85,7 +86,7 @@ class ReadcomiconlineIssueExtractor(ReadcomiconlineBase, ChapterExtractor):
return [
(beau(url), None)
for url in text.extract_iter(
page, 'lstImages.push("', '"'
page, "lstImages.push('", "'",
)
]
@ -129,10 +130,13 @@ class ReadcomiconlineComicExtractor(ReadcomiconlineBase, MangaExtractor):
def beau(url):
"""https://readcomiconline.li/Scripts/rguard.min.js?v=1.1"""
"""https://readcomiconline.li/Scripts/rguard.min.js"""
if url.startswith("https"):
return url
url = url.replace("_x236", "d")
url = url.replace("_x945", "g")
containsS0 = "=s0" in url
url = url[:-3 if containsS0 else -6]
url = url[4:22] + url[25:]