Closed fxh90 closed 3 years ago
It's seems there are some bugs in multiprocessing library so that the main process exit before all subprocess joined on MacOS.
https://github.com/RicterZ/nhentai/blob/master/nhentai/downloader.py#L135-L141
@fxh90 for now you can replace these lines with this:
for item in queue:
obj, url, folder = item
Downloader.download_(obj, url, folder)
and it will work.
@mileyvirus Thanks. I have test the lines in the dev version provided by myzWILLmake and it works perfectly without multithreading.
Semaphore object in multiprocessing module has different behaviors between MacOS or other platforms.
I use Semaphore.get_value()
to gain a value, to capture a ctrl-c signal. It works on Windows and Linux, but a NotImplementedException raised on MacOS. So the multiprocessing not working.
Hi,
I was trying to download my favourites using the suggested command:
nhentai --favorites --download --delay 1
, but no images had been downloaded. I checked the terminal output, and the script got the id's and titles correctly, but had no indication of extracting any image. In the CLI directory, new folders were created for each doujinshi, each of which contains an html and a json file.I tried to troubleshoot the situation. While being in China, I launched a global VPN, and checked that I could visit nhentai.net with my browser. The script extracted the list of id for my favourites with no problem (356 items).
The script was executed in: MacOS Catalina Ver 10.15.5 Python 3.7.3 (Anaconda distribution) nHentai ver 0.3.9
I'm wondering if anyone has the same problem.
Thanks.