DownloadAllContent

Lightweight web scraping script. Fetch and download main textual content from the current page, provide special support for novels

< Feedback on DownloadAllContent

Review: Good - script works

§
Posted: 28 September 2022

您好,十分感谢分享这插件。但能麻烦作者能分享一下这种网站的下载模板吗,之前分享的几个模板都不起作用。
http://www.zhainanxs.com/

hoothinPembuat
§
Posted: 28 September 2022

#list-chapterAll>dd>a>>item.href=item.href.replace(/.*gobook\('(\d+)','(\d+)'\).*/,"/go/$1/$2.html");return item;

§
Posted: 29 September 2022

太感谢了

§
Posted: 29 September 2022

麻烦再问一个问题,文章中的内页如何解决呢?麻烦再解决一下。实在是感谢

hoothinPembuat
§
Posted: 30 September 2022
Edited: 30 September 2022
#list-chapterAll>dd>a>>item.href=item.href.replace(/.\*book\('(\d+)','(\d+)'\).\*/,"/go/$1/$2.html");return item;@@@@@@let content=data.querySelector('h1~div');if(!content)return data.body.innerText;content.innerHTML=content.innerHTML.replace(/<br>/g,"\n");content=content.innerText;let pages=data.querySelectorAll(".chapterPages>a:not(.curr)");if(pages){let num=pages.length,cur=0;content=[content];[].forEach.call(pages, (page,i)=>{let url=page.href.replace(/.\*'(\d+)','([\d\_]+)'.\*/,"/go/$1/$2.html");fetch(url).then(r => r.text()).then(d => {let doc = document.implementation.createHTMLDocument(''); doc.documentElement.innerHTML = d;let c=doc.querySelector('h1~div');if(c){c.innerHTML=c.innerHTML.replace(/<br>/g,"\n"); content[i+1]=c.innerText;if(++cur>=num)cb(content.join("\n"));} }); });return false;}return content;

可以下载,但是缺字。去用小说下载器吧,那个脚本可以下载图片

§
Posted: 30 September 2022

多谢

Post reply

Sign in to post a reply.