漫画织机

漫画阅读 + 下载器,注重体验和对站点的负载控制。支持你正在搜索的站点。

< 脚本 漫画织机 的反馈

评价:好评 - 脚本运行良好

§
发布于:2025-09-27

eh和wnacg点击获取已下载的超过30多张图片时报错packaging failed, TypeError: Failed to fetch
按钮显示打包中,下载失败(重试)
但通过不断点击下载按钮有一定概率能下载,edge和chrome都出现这个问题
这是控制台内容:
userscript.html?name=Comic-Looms.user.js&id=6604f970-d6d6-49db-b026-881d2ec66e45:1691 2025/9/27 13:10:45 EHVP:event bus emitted: notify-message
userscript.html?name=Comic-Looms.user.js&id=6604f970-d6d6-49db-b026-881d2ec66e45:8500 Uncaught (in promise) TypeError: Failed to fetch
定位到
async download(chapters) {
try {
const archiveName = this.title(chapters).replaceAll(FILENAME_INVALIDCHAR, "_");
const separator = navigator.userAgent.indexOf("Win") !== -1 ? "\\" : "/";
const singleChapter = chapters.length === 1;
this.panel.flushUI("packaging");
const dirnameSet = /* @__PURE__ */ new Set();
const files = [];
for (let i = 0; i < chapters.length; i++) {
const chapter = chapters[i];
const picked = this.cherryPicks[i] || new CherryPick();
let directory = (() => {
if (singleChapter) return "";
if (chapter.title instanceof Array) {
return chapter.title.join("_").replaceAll(FILENAME_INVALIDCHAR, "_").replaceAll(/\s+/g, " ") + separator;
} else {
return chapter.title.replaceAll(FILENAME_INVALIDCHAR, "_").replaceAll(/\s+/g, " ") + separator;
}
})();
directory = shrinkFilename(directory, 200);
directory = deduplicate(dirnameSet, directory);
const ret = this.mapToFileLikes(chapter, picked, directory);
files.push(...ret);
}
const zip = new Zip({ volumeSize: 1024 * 1024 * (ADAPTER.conf.archiveVolumeSize || 1500) });
files.forEach((file) => zip.add(file));
const save = async () => {
let readable;
while (readable = zip.nextReadableStream()) {
const blob = await new Response(readable).blob();
const ext = zip.currVolumeNo === zip.volumes - 1 ? "zip" : "z" + (zip.currVolumeNo + 1).toString().padStart(2, "0");
fileSaver.saveAs(blob, `${archiveName}.${ext}`);
}
};
await save();
this.done = true;
} catch (error) {
let reason = error.toString();
if (reason.includes(`autoAllocateChunkSize`)) {
reason = "Create Zip archive prevented by The content security policy of this page. Please refer to the CONF > Help for a solution.";
}
EBUS.emit("notify-message", "error", `packaging failed, ${reason}`);
throw error;
} finally {
this.abort(this.done ? "downloaded" : "downloadFailed");
}
}

ZsyjkQinBai作者
§
发布于:2025-10-04

这有个相同的问题反馈: https://gf.qytechs.cn/scripts/397848-comic-looms/discussions/295868

看起来像是你的浏览器限制了blob对象的大小,致使无法打包稍微大一些的图片集合。

不过那个人最后只是更新了下他的windows系统,问题就消失了。

我无法复现你的问题,由于浏览器与系统的多样性,要排查是相当困难的。你试试用其他浏览器如Firefox,看看问题是否依旧?

发布留言

登录(不可用)以发布留言。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址