Girbons / comics-downloader

tool to download comics and manga in pdf/epub/cbr/cbz from a website
MIT License
453 stars 48 forks source link

readcomiconline.li issue #134

Closed Frostbrewn closed 10 months ago

Frostbrewn commented 10 months ago

Describe the bug Runtime error : Slice bounds out of range [ : -1] This error happens for certain comic series that uses this blogspot link format of RCOn_w

To Reproduce -url=https://readcomiconline.li/Comic/The-Amazing-Spider-Man-2018/Issue-1?id=136988#1

Expected behavior Script functioning properly.

Screenshots image Caption : Runtime error : Slice bounds out of range [ : -1]

image Caption : Suspected due to "RCOn_w" variance in URL parameter

image Caption : Appears on pages that has this edit

image Caption : This issue can download as intended

image Caption : The usual URL that works for this domain

image Caption : deobfuscateUrl() Desktop (please complete the following information):

Additional context Also, I would like to understand in detail about the deobfuscateUrl() function. I hope that you will be willing to impart some knowledge to a beginner like me.

Girbons commented 10 months ago

Hi @Frostbrewn thanks for the report!

This error happens for certain comic series that uses this blogspot link format of RCOn_w

the fix should be pretty easy, we should get the url by replacing _x236 and _x945

Also, I would like to understand in detail about the deobfuscateUrl() function. I hope that you will be willing to impart some knowledge to a beginner like me.

it's just a string manipulation, I took that from readcomiconline