potatoeggy / mandown

Comic/manga/webtoon downloader and CBZ/EPUB/MOBI/PDF converter
GNU Affero General Public License v3.0
45 stars 7 forks source link

Readcomiconline.li issue #84

Open Teofil98 opened 5 days ago

Teofil98 commented 5 days ago

What broke?

Mandown version Output of mandown --version: mandown 1.9.0

Describe the bug A clear and concise description of what the bug is.

The following error appears when trying to download a comic from readcomiconline.li

Traceback (most recent call last):

  File "/usr/bin/mandown", line 8, in <module>
    sys.exit(main())
             ^^^^^^

  File "/usr/lib/python3.12/site-packages/mandown/cli.py", line 550, in main
    app()

  File "/usr/lib/python3.12/site-packages/mandown/cli.py", line 428, in get
    for title in progress:

  File "/usr/lib/python3.12/site-packages/mandown/api.py", line 277, in download_progress
    image_urls = comic.get_chapter_image_urls(chap)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/site-packages/mandown/comic.py", line 47, in get_chapter_image_urls
    return self.source.fetch_chapter_image_list(chapter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/site-packages/mandown/sources/source_readcomiconline.py", line 71, in fetch_chapter_image_list
    images.append(self.beau(text[s_index:e_index]))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/site-packages/mandown/sources/source_readcomiconline.py", line 110, in beau
    url = binascii.a2b_base64(url).decode()
          ^^^^^^^^^^^^^^^^^^^^^^^^

binascii.Error: Invalid base64-encoded string: number of data characters (137) cannot be 1 more than a multiple of 4

Steps to reproduce If the downloader broke, please include a URL that breaks it.

mandown get https://readcomiconline.li/Comic/Batman-Year-One

Additional context Add any other context about the problem here.

potatoeggy commented 3 days ago

Thanks for opening an issue!

If you open the comic URL in your browser, do you get a Cloudflare captcha? If so, unfortunately, Mandown won't be able to download the comic because it can't bypass Cloudflare's anti-bot protection.

Teofil98 commented 2 days ago

Hi, thanks for the reply!

No, I don't get a captcha when opening the URL in a browser.