Skip to content

Commit

Permalink
[readcomiconline] update deobfuscation code (#2481)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed May 17, 2022
1 parent 4005171 commit 82c1cc1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gallery_dl/extractor/readcomiconline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -85,7 +86,7 @@ def images(self, page):
return [
(beau(url), None)
for url in text.extract_iter(
page, 'lstImages.push("', '"'
page, "lstImages.push('", "'",
)
]

Expand Down Expand Up @@ -129,10 +130,13 @@ def chapters(self, page):


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:]
Expand Down

0 comments on commit 82c1cc1

Please sign in to comment.