Xonshiz / comic-dl

Comic-dl is a command line tool to download manga and comics from various comic and manga sites. Supported sites : readcomiconline.to, mangafox.me, comic naver and many more.
https://github.com/Xonshiz/comic-dl
MIT License
546 stars 68 forks source link

Issue with comicextra chapters without number in their url #211

Closed greycubesgav closed 5 years ago

greycubesgav commented 5 years ago

Hi; I noticed an issue when trying to download chapters from comic-extra which don't have numbers in their name:

Example: https://www.comicextra.com/dragonlance-legends-time-of-the-twins/chapter-TPB

comic_dl -i https://www.comicextra.com/dragonlance-legends-time-of-the-twins/chapter-TPB

Traceback (most recent call last):
  File "comic_dl", line 10, in <module>
    ComicDL(sys.argv[1:])
  File "comic_dl.py", line 237, in __init__
    comic_language=args.manga_language[0], print_index=print_index)
  File "honcho.py", line 197, in checker
    print_index=print_index)
  File "sites/comicextra.py", line 30, in __init__
    conversion=conversion, keep_files=keep_files)
  File "sites/comicextra.py", line 48, in single_chapter
    chapter_number = int(str(comic_url.split("-")[-1]).replace("/full", ""))
ValueError: invalid literal for int() with base 10: 'TPB'

It looks like the parser is expecting an int in the chapter url?

Thanks Gavin