From 5bb2a2a3d255bd5062bd3ad70174193be1e6b14b Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Mon, 13 Jul 2026 18:33:09 +0200 Subject: [PATCH 1/2] update ScribblehubParser --- plugin/js/parsers/ScribblehubParser.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugin/js/parsers/ScribblehubParser.js b/plugin/js/parsers/ScribblehubParser.js index 481a5bad4..02b17c3c0 100644 --- a/plugin/js/parsers/ScribblehubParser.js +++ b/plugin/js/parsers/ScribblehubParser.js @@ -5,7 +5,7 @@ parserFactory.register("scribblehub.com", () => new ScribblehubParser()); class ScribblehubParser extends Parser { constructor() { super(); - this.minimumThrottle = 5000; + this.minimumThrottle = 5300; } async getChapterUrls(dom, chapterUrlsUI) { @@ -19,14 +19,11 @@ class ScribblehubParser extends Parser { ? `${baseUrl}?toc=${++nextTocIndex}` : null; }; - let saveThrottle = this.minimumThrottle; - this.minimumThrottle = 0; let chapters = (await this.walkTocPages(dom, ScribblehubParser.getChapterUrlsFromTocPage, nextTocPageUrl, chapterUrlsUI )).reverse(); - this.minimumThrottle = saveThrottle; return chapters; } From 7f3c5aa34ff0301a97fdf0e2c7f73f36e72ce528 Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Tue, 14 Jul 2026 17:54:31 +0200 Subject: [PATCH 2/2] update ScribblehubParser --- plugin/js/parsers/ScribblehubParser.js | 32 +++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/plugin/js/parsers/ScribblehubParser.js b/plugin/js/parsers/ScribblehubParser.js index 02b17c3c0..256cf75b1 100644 --- a/plugin/js/parsers/ScribblehubParser.js +++ b/plugin/js/parsers/ScribblehubParser.js @@ -5,10 +5,11 @@ parserFactory.register("scribblehub.com", () => new ScribblehubParser()); class ScribblehubParser extends Parser { constructor() { super(); - this.minimumThrottle = 5300; + this.minimumThrottle = 5200; } async getChapterUrls(dom, chapterUrlsUI) { + this.tocURL = dom.baseURI; let baseUrl = dom.baseURI; let nextTocIndex = 1; let numChapters = parseInt(dom.querySelector("span.cnt_toc").textContent); @@ -19,11 +20,14 @@ class ScribblehubParser extends Parser { ? `${baseUrl}?toc=${++nextTocIndex}` : null; }; + let saveThrottle = this.minimumThrottle; + this.minimumThrottle = 500; let chapters = (await this.walkTocPages(dom, ScribblehubParser.getChapterUrlsFromTocPage, nextTocPageUrl, chapterUrlsUI )).reverse(); + this.minimumThrottle = saveThrottle; return chapters; } @@ -32,6 +36,32 @@ class ScribblehubParser extends Parser { .map(a => util.hyperLinkToChapter(a)); } + async fetchChapter(url) { + let rules = [ + { + id: 1, + priority: 1, + action: { + type: "modifyHeaders", + requestHeaders: [ + { + header: "referer", + operation: "set", + value: this.tocURL, + }, + ], + }, + condition: { + urlFilter: "*://www.scribblehub.com/*", + }, + }, + ]; + + await HttpClient.setDeclarativeNetRequestRules(rules); + + return (await HttpClient.wrapFetch(url)).responseXML; + } + findContent(dom) { return dom.querySelector("div.fic_row, div#chp_raw"); }