From 3e420f05fa6b1d92f1957659e191a46de4fa5bfb Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:40:19 +0800 Subject: [PATCH 1/6] "" :) --- .travis.yml | 2 +- README.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b5330a..b99c73e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ 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 --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 diff --git a/README.rst b/README.rst index 5369190..235fd0b 100644 --- a/README.rst +++ b/README.rst @@ -48,7 +48,8 @@ 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: From bacaa096e07dbea314924d5fce35ea6cdaf9d708 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:46:06 +0800 Subject: [PATCH 2/6] fix #74 --- README.rst | 2 +- nhentai/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 235fd0b..c783158 100644 --- a/README.rst +++ b/README.rst @@ -48,7 +48,7 @@ Set your nhentai cookie against captcha: .. code-block:: bash - # + # nhentai --cookie "YOUR COOKIE FROM nhentai.net" Download specified doujinshi: diff --git a/nhentai/utils.py b/nhentai/utils.py index 3bdf278..6a0d00b 100644 --- a/nhentai/utils.py +++ b/nhentai/utils.py @@ -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 = '.' From 94395d9165346fa554cfa1b38decc6f9c2429857 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:46:48 +0800 Subject: [PATCH 3/6] remove comment --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index c783158..9c767e0 100644 --- a/README.rst +++ b/README.rst @@ -48,7 +48,6 @@ Set your nhentai cookie against captcha: .. code-block:: bash - # nhentai --cookie "YOUR COOKIE FROM nhentai.net" Download specified doujinshi: From 03f1aeada7e0e72bd5801cc7a9d9cb9d346df1da Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:48:47 +0800 Subject: [PATCH 4/6] fix bug in tag parser #70 --- nhentai/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nhentai/parser.py b/nhentai/parser.py index b96e707..cb53cc8 100644 --- a/nhentai/parser.py +++ b/nhentai/parser.py @@ -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 From 0a343935ab16bb00da000d417f460a275e83dcb4 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:55:12 +0800 Subject: [PATCH 5/6] update cookiewq --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b99c73e..cdb9d4f 100644 --- a/.travis.yml +++ b/.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/ From f2aa65b64bff1165e024b52e65343ca79a2b337f Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:58:00 +0800 Subject: [PATCH 6/6] 0.3.6 --- nhentai/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nhentai/__init__.py b/nhentai/__init__.py index 8efd062..2bc558a 100644 --- a/nhentai/__init__.py +++ b/nhentai/__init__.py @@ -1,3 +1,3 @@ -__version__ = '0.3.5' +__version__ = '0.3.6' __author__ = 'RicterZ' __email__ = 'ricterzheng@gmail.com'