mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	@@ -129,7 +129,7 @@ Download your favorites with delay:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.. code-block:: bash
 | 
					.. code-block:: bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nhentai --favorites --download --delay 1
 | 
					    nhentai --favorites --download --delay 1 --page 3-5,7
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Format output doujinshi folder name:
 | 
					Format output doujinshi folder name:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,7 +79,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='1',
 | 
					    parser.add_option('--page', '--page-range', type='string', dest='page', action='store',
 | 
				
			||||||
                      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])',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,7 +48,7 @@ def main():
 | 
				
			|||||||
        if not options.is_download:
 | 
					        if not options.is_download:
 | 
				
			||||||
            logger.warning('You do not specify --download option')
 | 
					            logger.warning('You do not specify --download option')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        doujinshis = favorites_parser() if options.page_all else favorites_parser(page=page_list)
 | 
					        doujinshis = favorites_parser(page=page_list) if options.page else favorites_parser()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif options.keyword:
 | 
					    elif options.keyword:
 | 
				
			||||||
        if constant.CONFIG['language']:
 | 
					        if constant.CONFIG['language']:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -311,7 +311,8 @@ def signal_handler(_signal, _frame):
 | 
				
			|||||||
def paging(page_string):
 | 
					def paging(page_string):
 | 
				
			||||||
    # 1,3-5,14 -> [1, 3, 4, 5, 14]
 | 
					    # 1,3-5,14 -> [1, 3, 4, 5, 14]
 | 
				
			||||||
    if not page_string:
 | 
					    if not page_string:
 | 
				
			||||||
        return []
 | 
					        # default, the first page
 | 
				
			||||||
 | 
					        return [1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    page_list = []
 | 
					    page_list = []
 | 
				
			||||||
    for i in page_string.split(','):
 | 
					    for i in page_string.split(','):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user