mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 02:41:19 +02:00
modify tests #54
This commit is contained in:
parent
049ab4d9ad
commit
263dba51f3
@ -13,9 +13,9 @@ install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- echo 268642 > /tmp/test.txt
|
- 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 --search umaru
|
||||||
- NHENTAI=https://nhentai.net nhentai --id=152503,146134 -t 10 --output=/tmp/
|
- NHENTAI=https://nhentai.net nhentai --id=152503,146134 -t 10 --output=/tmp/ --cbz
|
||||||
- NHENTAI=https://nhentai.net nhentai -l nhentai_test:nhentai --download --output=/tmp/
|
|
||||||
- NHENTAI=https://nhentai.net nhentai --tag lolicon
|
- 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
|
- NHENTAI=https://nhentai.net nhentai --file /tmp/test.txt
|
||||||
|
@ -22,17 +22,13 @@ def main():
|
|||||||
doujinshi_list = []
|
doujinshi_list = []
|
||||||
|
|
||||||
if options.favorites:
|
if options.favorites:
|
||||||
'''
|
if not options.is_download:
|
||||||
username, password = options.login.split(':', 1)
|
logger.warning('You do not specify --download option')
|
||||||
logger.info('Logging in to nhentai using credential pair \'%s:%s\'' % (username, '*' * len(password)))
|
|
||||||
login(username, password)
|
|
||||||
'''
|
|
||||||
|
|
||||||
if options.is_download or options.is_show:
|
|
||||||
for doujinshi_info in favorites_parser():
|
for doujinshi_info in favorites_parser():
|
||||||
doujinshi_list.append(Doujinshi(**doujinshi_info))
|
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])
|
print_doujinshi([{'id': i.id, 'title': i.name} for i in doujinshi_list])
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
@ -44,7 +40,6 @@ def main():
|
|||||||
|
|
||||||
if options.keyword:
|
if options.keyword:
|
||||||
doujinshis = search_parser(options.keyword, options.page)
|
doujinshis = search_parser(options.keyword, options.page)
|
||||||
print(doujinshis)
|
|
||||||
print_doujinshi(doujinshis)
|
print_doujinshi(doujinshis)
|
||||||
if options.is_download:
|
if options.is_download:
|
||||||
doujinshi_ids = map(lambda d: d['id'], doujinshis)
|
doujinshi_ids = map(lambda d: d['id'], doujinshis)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user