xuzhengyi1995 / Renta_Downloader

Download manga you rent from http://renta.papy.co.jp/
50 stars 16 forks source link

Exception Unknow Encoding error #19

Open whiteangel123 opened 3 months ago

whiteangel123 commented 3 months ago

This is not working anymore, I keep getting "Exception Unknow Encoding" error message in the command window

caomeijiangmei commented 3 months ago

Same here, sobs. @nutritionalyeest Need help~

nutritionalyeest commented 3 months ago

@whiteangel123 I've found that error can occur if your cookie has expired, or if it's typed in in wrong. also make sure you have this bit of code after your cookie: .encode('utf-8') (so your main.py line 16 should look like this, except where you insert the cookie text string ofc: ) image

@caomeijiangmei I think it may be broken for you because the changes I had you make before are no longer needed. I recommend changing the code in main.py back to how it is in this repo. That's what worked for me!

Hope this helps!

whiteangel123 commented 3 months ago

@nutritionalyeest Maybe I'm entering the wrong cookie or wrong URL because this is the traceback error that I got:

Traceback (most recent call last): File "F:\Renta_Downloader-master\main.py", line 308, in <module> start_download(url) File "F:\Renta_Downloader-master\main.py", line 98, in start_download download_info = get_download_info(url) ^^^^^^^^^^^^^^^^^^^^^^ File "F:\Renta_Downloader-master\main.py", line 131, in get_download_info raise Exception('Unknow encoding.') Exception: Unknow encoding.

The format seems to have changed since so maybe I clicked on the wrong item and it's showing me the wrong URL/cookie??

caomeijiangmei commented 3 months ago

@whiteangel123 I've found that error can occur if your cookie has expired, or if it's typed in in wrong. also make sure you have this bit of code after your cookie: .encode('utf-8') (so your main.py line 16 should look like this, except where you insert the cookie text string ofc: ) image

@caomeijiangmei I think it may be broken for you because the changes I had you make before are no longer needed. I recommend changing the code in main.py back to how it is in this repo. That's what worked for me!

Hope this helps!

It works!! Thx~ When you're typing the manga URL, just remember to add /index.view?ver=new instead of /index.view, and keep in mind to set your cookie to Medusa_set_version=new.

nutritionalyeest commented 3 months ago

@nutritionalyeest Maybe I'm entering the wrong cookie or wrong URL because this is the traceback error that I got:

Traceback (most recent call last): File "F:\Renta_Downloader-master\main.py", line 308, in <module> start_download(url) File "F:\Renta_Downloader-master\main.py", line 98, in start_download download_info = get_download_info(url) ^^^^^^^^^^^^^^^^^^^^^^ File "F:\Renta_Downloader-master\main.py", line 131, in get_download_info raise Exception('Unknow encoding.') Exception: Unknow encoding.

The format seems to have changed since so maybe I clicked on the wrong item and it's showing me the wrong URL/cookie??

@whiteangel123 For me, the url that works is the one from the viewer window, it looks like this: image

The cookie is in the developer tools Network tab, index.view: image

Sorry if this wasn't what you were asking!

whiteangel123 commented 4 days ago

I now have a different error:

`File "F:\Renta_Downloader-master\main.py", line 159, in get_download_info sum_page = int(re_max_page.findall(data)[0])


IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "F:\Renta_Downloader-master\main.py", line 308, in <module>
    start_download(url)
  File "F:\Renta_Downloader-master\main.py", line 98, in start_download
    download_info = get_download_info(url)
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "F:\Renta_Downloader-master\main.py", line 161, in get_download_info
    raise Exception('Can not find sum_page on the page')
Exception: Can not find sum_page on the page`