notmahi / Manga.py

Small python scripts to download manga from online manga reading sites like Mangastream or Mangareader just from a link.
MIT License
0 stars 0 forks source link

Mangastream error #3

Open kurokirasama opened 6 years ago

kurokirasama commented 6 years ago

Hello, when it seems I have python 3.x so I have to change raw_input for input. Besides, I also have to add this before the second if:

if site_name[:8] == 'https://':
        site_name = site_name[8:]

When running, I got this output:

Getting pages list...                            Traceback (most recent call last):
  File "manga.py", line 50, in <module>              main()
  File "manga.py", line 45, in main                  elif site_name == 'mangastream' or site_name == 'readms':            mangastream.main(url)      File "src/mangastream.py", line 21, in main
    content = content.replace("\n", '')          TypeError: a bytes-like object is required, not 'str'                                             

on this url: https://mangastream.com/read/attack_on_titan/099/4691/1. I've never coded python before so i might have messed up something with my changes.

notmahi commented 6 years ago

Hi @kurokirasama , This was designed for python, and I don't expect it to behave well with python3's bytes/strings issue. Sorry for the trouble! You can try learning more about the string-vs-bytes issue here. Mahi