mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.56k stars 949 forks source link

[kissmanga] AttributeError: 'NoneType' object has no attribute 'group' #46

Closed jtara1 closed 6 years ago

jtara1 commented 6 years ago

At a glance, it looks like some regex failed to match and the program continued to use the None value expecting it be a match.

cmd: gallery-dl http://kissmanga.com/Manga/Liar-Game python 3.6 gallery-dl v0.9.1

PS C:\Users\James\Downloads> gallery-dl http://kissmanga.com/Manga/Liar-Game
[kissmanga][error] An unexpected error occurred:
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\gallery_dl\job.py", line 44, in run
    for msg in self.extractor:
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 73, in items
    data = self.get_job_metadata(page)
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 88, in get_job_metadata
    chminor = match.group(3) or match.group(6)
AttributeError: 'NoneType' object has no attribute 'group'
[kissmanga][error] An unexpected error occurred:
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\gallery_dl\job.py", line 44, in run
    for msg in self.extractor:
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 73, in items
    data = self.get_job_metadata(page)
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 88, in get_job_metadata
    chminor = match.group(3) or match.group(6)
AttributeError: 'NoneType' object has no attribute 'group'
[kissmanga][error] An unexpected error occurred:
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\gallery_dl\job.py", line 44, in run
    for msg in self.extractor:
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 73, in items
    data = self.get_job_metadata(page)
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 88, in get_job_metadata
    chminor = match.group(3) or match.group(6)
AttributeError: 'NoneType' object has no attribute 'group'
[kissmanga][error] An unexpected error occurred:
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\gallery_dl\job.py", line 44, in run
    for msg in self.extractor:
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 73, in items
    data = self.get_job_metadata(page)
  File "c:\python36\lib\site-packages\gallery_dl\extractor\kissmanga.py", line 88, in get_job_metadata
    chminor = match.group(3) or match.group(6)
AttributeError: 'NoneType' object has no attribute 'group'
mikf commented 6 years ago

This has already been fixed in d68a24a. kissmanga.com changed their newline characters from \n to \r\n, which caused metadata-extraction to return an unexpected result, which in turn didn't match the regular expression.