Nandaka / PixivUtil2

Download images from Pixiv and more!
http://nandaka.devnull.zone/
BSD 2-Clause "Simplified" License
2.38k stars 255 forks source link

Unable to download both r18 and non-r18 together #244

Closed Voxtopass closed 7 years ago

Voxtopass commented 7 years ago

Downloading new illustrations from bookmarks misses all r18 pictures if r18 mode is off, and downloads only them if r18 mode is on. If a user wants to download the entirety of some pages from their New Work: Following section, they must first download non-r18 works, then change the config entry for r18 mode to "true", then download r18 works (starting and ending from different page numbers). This seems much less intuitive than allowing an option to download/search for both at the same time. Especially for a menu selection that focuses on downloading whole pages at a time.

If there is a way to do this and I've missed it, I apologize in advance.

Nandaka commented 7 years ago

Q6. The app doesn't download all the images!

Voxtopass commented 7 years ago

I've read and understand the readme. What that section does not make clear is setting r18mode in config.ini to False will only download non-R-18 images. And there is no mode to include both, which is what my initial comment was explaining.

Upon first using the program, my first assumption was that setting r18mode to False would "download all the images", which is what Q6 that you quoted implies. But this is not the case. If set to False, only non-r18 images will be downloaded.

Nandaka commented 7 years ago

Ah, no wonder. New Illustration separate the url for non-R18 and R18. Refer to https://github.com/Nandaka/PixivUtil2/blob/master/PixivUtil2.py#L1071

Some enhancement needed. Assuming r18mode == False, do you prefer to process all non-R-18 first then the R18 list, or interleaved between non R-18 and R18 (e.g. nonR18 page1 -> r18 page1, then nonR18 page2 -> r18 page2, etc)

Voxtopass commented 7 years ago

Well, when I navigate to https://www.pixiv.net/bookmark_new_illust.php , it includes BOTH r-18 and non-r-18 posts together, in the same list. Which is what I would most prefer, if there's some way for that to be done. If that's the URL that the program is getting results from, it seems odd that r-18 don't get downloaded with r18mode set to False. I just tested it by going to that URL, and I can see several r-18 posts at that URL that the program completely skips over. It seems like something else may be wrong. I'm sure that I have r18mode set to false and my r18 settings on Pixiv are correct (I can see r18 posts when I visit the site and my settings are correct).

Since the amount of r18 and non-r18 results differ by so much, I don't think using the same page numbers to process both would particularly help me, but interleaved would most likely be better for organization. Though I would much prefer if they could be processed together like I mentioned above.

Nandaka commented 7 years ago

Weird, I tried it (option 8) and it does download both normal and R-18 images. I've double check the code and it doesn't do filtering for R-18 only images when getting the images from https://www.pixiv.net/bookmark_new_illust.php?p=1

Try to delete the cookie value in config.ini?

Voxtopass commented 7 years ago

I also tried looking through the r-18 section of code that you linked and didn't see anything.

Deleting the cookie didn't work, so I reinstalled the program folder and copied over my config from the previous installation (minus the cookie value) and it works now. However, there is a config.ini.error file in the old folder that I just now realized was there. The error file is the same as my config, aside from r18mode being set to True. Though I could upload it if it would be of help to you. I removed the config file, the config backup file, and the error file, and now the old installation of the program works as well. The only thing I could suppose that happened is that I made an error in setting up my config the first time, but it works again now, with the same config.

I'm sorry for the misunderstanding. Thanks for the help and the work you've done on the downloader.