Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain tags don't work when language is set to english. --clean-language doesn't produce any results #292

Open
stuffstu opened this issue Aug 8, 2023 · 1 comment

Comments

@stuffstu
Copy link

stuffstu commented Aug 8, 2023

Using latest version, installed through pip. Windows 11

`python command.py nhentai -s "females only"

[17:16:42] banner: nHentai ver 0.5.3: あなたも変態。 いいね?

[17:16:42] main: Using mirror: https://nhentai.net

[17:16:42] main: Using viewer template "default"

[17:16:42] check_cookie: Login successfully! Your username: lol69xdyuri

[17:16:42] main: Using default language: eng

[17:16:42] search_parser: Searching doujinshis using keywords "females only language:eng" on page 1

[17:16:43] search_parser: No result in response in page 1

[17:16:43] main: All done.`

I've noticed this also occur in a few other tags like 'yaoi' and 'anal intercourse', works perfectly fine if I set the language to Japanese though.
Here's what happens when I run the --clean-language command:

`python command.py nhentai --clean-language
[17:16:08] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
Usage:
nhentai --search [keyword] --download
NHENTAI=https://nhentai-mirror-url/ nhentai --id [ID ...]
nhentai --file [filename]

Environment Variable:
NHENTAI nhentai mirror url

Options:
-h, --help show this help message and exit
-D, --download download doujinshi (for search results)
-S, --show just show the doujinshi information
--id doujinshi ids set, e.g. 167680 167681 167682
-s KEYWORD, --search=KEYWORD
search doujinshi by keyword
-F, --favorites list or download your favorites
--page-all all search results
--page=PAGE, --page-range=PAGE
page number of search results. e.g. 1,2-5,14
--sorting=SORTING, --sort=SORTING
sorting of doujinshi (recent / popular /
popular-[today|week])
-o OUTPUT_DIR, --output=OUTPUT_DIR
output dir
-t THREADS, --threads=THREADS
thread count for downloading doujinshi
-T TIMEOUT, --timeout=TIMEOUT
timeout for downloading doujinshi
-d DELAY, --delay=DELAY
slow down between downloading every doujinshi
--proxy=PROXY store a proxy, for example: -p "http://127.0.0.1:1080"
-f FILE, --file=FILE read gallery IDs from file.
--format=NAME_FORMAT format the saved folder name
--dry-run Dry run, skip file download
--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
-P, --pdf generate PDF file
--rm-origin-dir remove downloaded doujinshi dir when generated CBZ or
PDF file
--meta generate a metadata file in doujinshi format
--regenerate-cbz regenerate the cbz file if exists
--cookie=COOKIE set cookie of nhentai to bypass Cloudflare captcha
--useragent=USERAGENT, --user-agent=USERAGENT
set useragent to bypass Cloudflare captcha
--language=LANGUAGE set default language to parse doujinshis
--clean-language set DEFAULT as language to parse doujinshis
--save-download-history
save downloaded doujinshis, whose will be skipped if
you re-download them
--clean-download-history
clean download history
--template=VIEWER_TEMPLATE
set viewer template
--legacy use legacy searching method`

update: was able to fix the language issue by setting language as blank. Still can't get a response from nh though for the tag "females only". Also doesn't work for the tags previously mentioned above.

python command.py -s "females only"
[19:15:26] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[19:15:26] main: Using mirror: https://nhentai.net
[19:15:26] main: Using viewer template "default"
[19:15:27] check_cookie: Login successfully! Your username: lol69xdyuri
[19:15:27] search_parser: Searching doujinshis using keywords "females only" on page 1
[19:15:28] search_parser: No result in response in page 1
[19:15:28] main: All done.

Furthermore, it only works when I specify "Japanese".

Starting to think that this is an api issue on nhentai's side. Any possible fixes?

Update 2: Managed to fix it by specifying 'tag:females only'. Idk why but it works.

Update 3: Using the legacy search parser gives full results for the tag I used, whereas the normal would have some page results missing.

@Spyridion
Copy link
Contributor

Spyridion commented Sep 11, 2023

I'd like to comment that I'm also noticing this problem as well. I noticed some artist searches are returning back 0 results despite seeing quite a few on the website. Ex: nhentai --search="artist:tamagou" --page-all gives {"result":[],"num_pages":0,"per_page":25} in the raw data received. Here is the url generated for the search: https://nhentai.net/api/galleries/search?query=artist%3Atamagou+language%3Aenglish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants