From 0935d609c353f472c6cc024655f1e383595a5817 Mon Sep 17 00:00:00 2001 From: symant233 Date: Wed, 29 May 2019 13:43:47 +0800 Subject: [PATCH] fix --gen-main action --- nhentai/cmdline.py | 2 +- nhentai/command.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nhentai/cmdline.py b/nhentai/cmdline.py index 9e15359..2b87250 100644 --- a/nhentai/cmdline.py +++ b/nhentai/cmdline.py @@ -103,7 +103,7 @@ def cmd_parser(): generate_html() exit(0) - if args.main_viewer: + if args.main_viewer and not args.favorites and args.id is None and not args.is_download: generate_main_html() exit(0) diff --git a/nhentai/command.py b/nhentai/command.py index 88a8c97..907ec29 100644 --- a/nhentai/command.py +++ b/nhentai/command.py @@ -16,8 +16,13 @@ from nhentai.utils import generate_html, generate_cbz, generate_main_html def main(): banner() - logger.info('Using mirror: {0}'.format(BASE_URL)) options = cmd_parser() + logger.info('Using mirror: {0}'.format(BASE_URL)) + + from nhentai.constant import PROXY + # constant.PROXY will be changed after cmd_parser() + if PROXY != {}: + logger.info('Using proxy: {0}'.format(PROXY)) doujinshi_ids = [] doujinshi_list = []