From 070e8917f460f8ea463726699c3a277e0bc75b31 Mon Sep 17 00:00:00 2001 From: Alocks Date: Sat, 5 Oct 2019 15:07:49 -0300 Subject: [PATCH] =?UTF-8?q?Fixed=20whitespaces=20when=20using=20comma?= =?UTF-8?q?=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nhentai/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nhentai/parser.py b/nhentai/parser.py index cc4f74c..fef71ca 100644 --- a/nhentai/parser.py +++ b/nhentai/parser.py @@ -197,10 +197,10 @@ def print_doujinshi(doujinshi_list): def tag_parser(tag_name, max_page=1, index=0): result = [] tag_name = tag_name.lower() - tag_name = tag_name.replace(' ', '-') if ',' in tag_name: - tag_name = [i.strip() for i in string.split(',')] - + tag_name = [i.strip().replace(' ', '-') for i in tag_name.split(',')] + else: tag_name = tag_name.replace(' ', '-') + for p in range(1, max_page + 1): logger.debug('Fetching page {0} for doujinshi with tag \'{1}\''.format(p, tag_name)) if isinstance(tag_name, str):