X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=nhentai%2Fparser.py;fp=nhentai%2Fparser.py;h=582add25ab160bf46199f17a4cf22a5494143fc9;hb=af379c825c49779fca0424e45aad86eb1b9e384f;hp=be6643c5949ee0dd84f7fc1d7853dbe86f3a8206;hpb=2f9386f22c630c461599072f6843d0542fe041d0;p=nhentai.git diff --git a/nhentai/parser.py b/nhentai/parser.py index be6643c..582add2 100644 --- a/nhentai/parser.py +++ b/nhentai/parser.py @@ -118,8 +118,9 @@ def doujinshi_parser(id_): response = request('get', url) 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)