modify tests #54

This commit is contained in:
RicterZ 2019-05-18 19:40:09 +08:00
parent 049ab4d9ad
commit 263dba51f3
2 changed files with 10 additions and 15 deletions

View File

@ -13,9 +13,9 @@ install:
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

View File

@ -22,17 +22,13 @@ def main():
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))
if options.is_show and not options.is_download:
if not options.is_download:
print_doujinshi([{'id': i.id, 'title': i.name} for i in doujinshi_list])
exit(0)
@ -44,7 +40,6 @@ def main():
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)