From 97857b8dc6baa7c4252676e5e2ca3965e304d074 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:40:19 +0800 Subject: [PATCH 01/12] "" :) --- .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 4ca582c1048a9958e15969129e687d83e38dc9b3 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:46:06 +0800 Subject: [PATCH 02/12] 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 44178a8cfb02dcb62bb722d8e6fdd187c77864a7 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:46:48 +0800 Subject: [PATCH 03/12] 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 6e2a25cf55839996a5ccd383c0487362ffcd1f6f Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:48:47 +0800 Subject: [PATCH 04/12] 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 62e3552c847af7cd840d79c99acf6a47c6d85107 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:55:12 +0800 Subject: [PATCH 05/12] 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 d045adfd6adbe2f3afd96af523bca3467c14ef01 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Sun, 28 Jul 2019 11:58:00 +0800 Subject: [PATCH 06/12] 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' From d6461335f83aceca37e9be9a031e10b95c0147e2 Mon Sep 17 00:00:00 2001 From: jwfiredragon Date: Thu, 21 Nov 2019 08:40:57 -0800 Subject: [PATCH 07/12] Adding --gen-main to documentation --gen-main exists as an option in cmdline.py but is not documented in README --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 9c767e0..fd6f27b 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,7 @@ Other options: # Generating options --html generate a html viewer at current directory --no-html don't generate HTML after downloading + --gen-main generate a main viewer contain all the doujin in the folder -C, --cbz generate Comic Book CBZ File --rm-origin-dir remove downloaded doujinshi dir when generated CBZ file. From 9592870d85ab4baeb9b5da73ecdaca68c2fc4183 Mon Sep 17 00:00:00 2001 From: symant233 Date: Wed, 11 Dec 2019 10:55:50 +0800 Subject: [PATCH 08/12] add html viewer @media --- nhentai/viewer/styles.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nhentai/viewer/styles.css b/nhentai/viewer/styles.css index f9830dc..9f7b7a9 100644 --- a/nhentai/viewer/styles.css +++ b/nhentai/viewer/styles.css @@ -66,4 +66,10 @@ html, body { 0 0 2px #222, 0 0 2px #222, 0 0 2px #222; +} + +@media only screen and (max-width: 855px) { + nav { + display: none; + } } \ No newline at end of file From 05eaa9eebc338cdf7cf926fd547705deca38c177 Mon Sep 17 00:00:00 2001 From: symant233 Date: Wed, 11 Dec 2019 18:35:53 +0800 Subject: [PATCH 09/12] fix 'max-width' not working --- nhentai/viewer/index.html | 1 + nhentai/viewer/styles.css | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/nhentai/viewer/index.html b/nhentai/viewer/index.html index 6d344e3..33ea2af 100644 --- a/nhentai/viewer/index.html +++ b/nhentai/viewer/index.html @@ -2,6 +2,7 @@ + {TITLE}