]> git.lizzy.rs Git - nhentai.git/commitdiff
Merge branch 'master' into dev
authorRicter Zheng <RicterZheng@gmail.com>
Sun, 10 Jan 2021 06:40:09 +0000 (14:40 +0800)
committerGitHub <noreply@github.com>
Sun, 10 Jan 2021 06:40:09 +0000 (14:40 +0800)
1  2 
nhentai/parser.py

index be6643c5949ee0dd84f7fc1d7853dbe86f3a8206,0df571005a29a0db1f908e4bd026db0d3bf5fd56..582add25ab160bf46199f17a4cf22a5494143fc9
@@@ -116,10 -116,11 +116,11 @@@ def doujinshi_parser(id_)
  
      try:
          response = request('get', url)
 -        if response.status_code in (200,):
 +        if response.status_code in (200, ):
              response = response.content
-         elif response.status_code in (404, ):
-             raise Exception('Seems doujinshi {} does not exist'.format(id_))
+         elif response.status_code in (404,):
+             logger.error("Doujinshi with id {0} cannot be found".format(id_))
+             return []
          else:
              logger.debug('Slow down and retry ({}) ...'.format(id_))
              time.sleep(1)