script:
- echo 268642 > /tmp/test.txt
+ - NHENTAI=https://nhentai.net nhentai --cookie '__cfduid=da09f237ceb0f51c75980b0b3fda3ce571558179357; _ga=GA1.2.2000087053.1558179358; _gid=GA1.2.717818542.1558179358; csrftoken=iSxrTFOjrujJqauhAqWvTTI9dl3sfWnxdEFoMuqgmlBrbMin5Gj9wJW4r61cmH1X; sessionid=ewuaayfewbzpiukrarx9d52oxwlz2esd'
- NHENTAI=https://nhentai.net nhentai --search umaru
- - NHENTAI=https://nhentai.net nhentai --id=152503,146134 -t 10 --output=/tmp/
- - NHENTAI=https://nhentai.net nhentai -l nhentai_test:nhentai --download --output=/tmp/
+ - NHENTAI=https://nhentai.net nhentai --id=152503,146134 -t 10 --output=/tmp/ --cbz
- NHENTAI=https://nhentai.net nhentai --tag lolicon
- - NHENTAI=https://nhentai.net nhentai --id 92066 --output=/tmp/ --cbz
+ - NHENTAI=https://nhentai.net nhentai -F
- NHENTAI=https://nhentai.net nhentai --file /tmp/test.txt
doujinshi_list = []
if options.favorites:
- '''
- username, password = options.login.split(':', 1)
- logger.info('Logging in to nhentai using credential pair \'%s:%s\'' % (username, '*' * len(password)))
- login(username, password)
- '''
+ if not options.is_download:
+ logger.warning('You do not specify --download option')
- if options.is_download or options.is_show:
- for doujinshi_info in favorites_parser():
- doujinshi_list.append(Doujinshi(**doujinshi_info))
+ for doujinshi_info in favorites_parser():
+ doujinshi_list.append(Doujinshi(**doujinshi_info))
- if options.is_show and not options.is_download:
- print_doujinshi([{'id': i.id, 'title': i.name} for i in doujinshi_list])
- exit(0)
+ if not options.is_download:
+ print_doujinshi([{'id': i.id, 'title': i.name} for i in doujinshi_list])
+ exit(0)
if options.tag:
doujinshis = tag_parser(options.tag, max_page=options.max_page)
if options.keyword:
doujinshis = search_parser(options.keyword, options.page)
- print(doujinshis)
print_doujinshi(doujinshis)
if options.is_download:
doujinshi_ids = map(lambda d: d['id'], doujinshis)