Tsuk1ko / nhentai-helper

🔞 A user script make it easy for you to download nHentai manga as zip (or cbz), also support some mirror sites. 一个可以让你轻松打包下载 nHentai 本子的用户脚本,并支持一些镜像站
https://greasyfork.org/scripts/375992
GNU General Public License v3.0
579 stars 45 forks source link

Page download. #33

Closed bropines closed 1 year ago

bropines commented 1 year ago

Is it possible to add a feature where you can download N-number of pages of a certain tag or search query? If not, question, is there any way to either download the entire manga from the currently open page?

Tsuk1ko commented 1 year ago

I have no plans to add such functions at present. It's a bit inconsistent with my original intention to make this script.

But you can use js to trigger the click event of all download buttons to do that.

bropines commented 1 year ago

I have no plans to add such functions at present. It's a bit inconsistent with my original intention to make this script.

But you can use js to trigger the click event of all download buttons to do that.

It remains for me an idiot to figure out how to do this, but thank you for the answer

bropines commented 1 year ago

I have no plans to add such functions at present. It's a bit inconsistent with my original intention to make this script. But you can use js to trigger the click event of all download buttons to do that.

It remains for me an idiot to figure out how to do this, but thank you for the answer

I (almost) made the code for the console (12 hours I sat on it).

For those who use preloader extension for tampermonkey. Just scroll down to the max and run the script.

let nodeList = document.querySelectorAll(".download-zip-btn") ;
nodeList=[...nodeList]

for (let step = 0; step < 25; step++) {
    let currentElement = nodeList.shift();
    currentElement.click();
}

let interval = setInterval(()=>{
    var step;
    for (step = 0; step < 25; step++) {
        let currentElement = nodeList.shift();
        currentElement.click();
    }

    if (nodeList.length == 0) {
        clearInterval(interval);
    }

}, 120000);

Version for those without Preloader

document.querySelectorAll(".download-zip-btn").forEach(item => {item.click()});
bropines commented 1 year ago

@Tsuk1ko Is it possible to add more multithreading? At the moment it can load 1 and compress one. I would like to be able to download more than one manga at a time.

Tsuk1ko commented 1 year ago

@Tsuk1ko Is it possible to add more multithreading? At the moment it can load 1 and compress one. I would like to be able to download more than one manga at a time.

In fact they are all multithreaded.

Many pages will be downloaded at the same time, you can increase the number of threads in the settings.

Compression is actually an independent queue and multithreaded, if your download speed is fast enough you can see it.

bropines commented 1 year ago

I probably didn't put it that way. The fact is that he loads quickly, but only one manga. that is, not in parallel. Or I have a bug. But when I download the conditional 20 mangs, he starts pumping one (quickly) and only when compression begins, the second start download

bropines commented 1 year ago

browser_wkRPsbB6DF

Tsuk1ko commented 1 year ago

This is correct behavior. Mangas are downloaded serially, only pages are downloaded in parallel.

bropines commented 1 year ago

This is correct behavior. Mangas are downloaded serially, only pages are downloaded in parallel.

Will parallel manga loading be added?

Tsuk1ko commented 1 year ago

This is correct behavior. Mangas are downloaded serially, only pages are downloaded in parallel.

Will parallel manga loading be added?

No, they are essentially the same thing. It's actually downloading multiple pages at the same time.