fix some bugs #277

This commit is contained in:
Ricter Z 2023-03-28 20:54:02 +08:00
parent f9878d080b
commit aa77cb1c7c
3 changed files with 2 additions and 3 deletions

View File

@ -77,7 +77,7 @@ def cmd_parser():
# page options # page options
parser.add_option('--page-all', dest='page_all', action='store_true', default=False, parser.add_option('--page-all', dest='page_all', action='store_true', default=False,
help='all search results') 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') help='page number of search results. e.g. 1,2-5,14')
parser.add_option('--sorting', '--sort', dest='sorting', action='store', default='popular', parser.add_option('--sorting', '--sort', dest='sorting', action='store', default='popular',
help='sorting of doujinshi (recent / popular / popular-[today|week])', help='sorting of doujinshi (recent / popular / popular-[today|week])',

View File

@ -39,7 +39,6 @@ def main():
doujinshis = [] doujinshis = []
doujinshi_ids = [] doujinshi_ids = []
doujinshi_list = []
page_list = paging(options.page) page_list = paging(options.page)

View File

@ -294,7 +294,7 @@ def search_parser(keyword, sorting, page, is_page_all=False):
'page': p, 'sort': sorting}).url 'page': p, 'sort': sorting}).url
if constant.DEBUG: 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() response = request('get', url.replace('%2B', '+')).json()
except Exception as e: except Exception as e: