mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-19 10:21:19 +02:00
commit
4fc6303db2
12
.travis.yml
12
.travis.yml
@ -13,10 +13,10 @@ install:
|
||||
|
||||
script:
|
||||
- echo 268642 > /tmp/test.txt
|
||||
- NHENTAI=https://nhentai.net nhentai --cookie '__cfduid=da09f237ceb0f51c75980b0b3fda3ce571558179357; _ga=GA1.2.2000087053.1558179358; _gid=GA1.2.782652201.1560348447; csrftoken=E2O8wfriFkcXUgN1AC41DoLqfRaBbggIUdvy46yC45PKCRCmCHQHQ7YRUy0d7FXZ; sessionid=0rapzxkt6yl1wjhdxm9whtfdc7gvw0iu'
|
||||
- NHENTAI=https://nhentai.net nhentai --search umaru
|
||||
- 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 -F
|
||||
- NHENTAI=https://nhentai.net nhentai --file /tmp/test.txt
|
||||
- nhentai --cookie "csrftoken=3c4Mzn4f6NAI1awFqfIh495G3pv5Wade9n63Kx03mkSac8c2QR5vRR4jCwVzb3OR; sessionid=m034e2dyyxgbl9s07hbzgfhvadbap2tk"
|
||||
- nhentai --search umaru
|
||||
- nhentai --id=152503,146134 -t 10 --output=/tmp/ --cbz
|
||||
- nhentai --tag lolicon
|
||||
- nhentai -F
|
||||
- nhentai --file /tmp/test.txt
|
||||
- nhentai --id=152503,146134 --gen-main --output=/tmp/
|
||||
|
@ -48,7 +48,7 @@ Set your nhentai cookie against captcha:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
nhentai --cookie 'YOUR COOKIE FROM nhentai.net'
|
||||
nhentai --cookie "YOUR COOKIE FROM nhentai.net"
|
||||
|
||||
Download specified doujinshi:
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
__version__ = '0.3.5'
|
||||
__version__ = '0.3.6'
|
||||
__author__ = 'RicterZ'
|
||||
__email__ = 'ricterzheng@gmail.com'
|
||||
|
@ -201,9 +201,9 @@ def tag_parser(tag_name, max_page=1):
|
||||
|
||||
for p in range(1, max_page + 1):
|
||||
logger.debug('Fetching page {0} for doujinshi with tag \'{1}\''.format(p, tag_name))
|
||||
response = request('get', url='%s/%s?page=%d' % (constant.TAG_URL, tag_name, p)).content
|
||||
response = request('get', url='%s/%s/?page=%d' % (constant.TAG_URL, tag_name, p)).content
|
||||
|
||||
result = _get_title_and_id(response)
|
||||
result += _get_title_and_id(response)
|
||||
if not result:
|
||||
logger.error('Cannot find doujinshi id of tag \'{0}\''.format(tag_name))
|
||||
return
|
||||
|
@ -168,7 +168,7 @@ def generate_main_html(output_dir='./'):
|
||||
def generate_cbz(output_dir='.', doujinshi_obj=None, rm_origin_dir=False):
|
||||
if doujinshi_obj is not None:
|
||||
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
|
||||
cbz_filename = os.path.join(os.path.join(doujinshi_dir, '..'), '%s.cbz' % doujinshi_obj.id)
|
||||
cbz_filename = os.path.join(os.path.join(doujinshi_dir, '..'), '{}.cbz'.format(doujinshi_obj.filename))
|
||||
else:
|
||||
cbz_filename = './doujinshi.cbz'
|
||||
doujinshi_dir = '.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user