diff --git a/nhentai/cmdline.py b/nhentai/cmdline.py index 31db53a..ad61f3e 100644 --- a/nhentai/cmdline.py +++ b/nhentai/cmdline.py @@ -77,7 +77,7 @@ def cmd_parser(): # page options parser.add_option('--page-all', dest='page_all', action='store_true', default=False, help='all search results') - parser.add_option('--page', '--page-range', type='string', dest='page', action='store', default='', + parser.add_option('--page', '--page-range', type='string', dest='page', action='store', default='1', help='page number of search results. e.g. 1,2-5,14') parser.add_option('--sorting', '--sort', dest='sorting', action='store', default='popular', help='sorting of doujinshi (recent / popular / popular-[today|week])', diff --git a/nhentai/command.py b/nhentai/command.py index 32032d2..ca8cc41 100644 --- a/nhentai/command.py +++ b/nhentai/command.py @@ -39,7 +39,6 @@ def main(): doujinshis = [] doujinshi_ids = [] - doujinshi_list = [] page_list = paging(options.page) diff --git a/nhentai/parser.py b/nhentai/parser.py index 8d6bf3f..361d29d 100644 --- a/nhentai/parser.py +++ b/nhentai/parser.py @@ -294,7 +294,7 @@ def search_parser(keyword, sorting, page, is_page_all=False): 'page': p, 'sort': sorting}).url if constant.DEBUG: - logger.debug(f'Request URL: {url}?query={keyword}&page={p}&sort={sorting}') + logger.debug(f'Request URL: {url}') response = request('get', url.replace('%2B', '+')).json() except Exception as e: