WebToEpub icon indicating copy to clipboard operation
WebToEpub copied to clipboard

WebToEpub cannot capture the Story Seedling Webpage

Open readingthings8-cell opened this issue 2 months ago • 1 comments

Hi, so I recently discovered this issue where webtoepub cannot take in the webpages of the story seeding website, i think they have some sort of protection against it? Anyways trying to copy and paste does not work and webtoepub cannot capture the contents of the page it just shows up blank.

Image

Any suggestions how to get the contents to be visible? I've also tried using this story seedling parser on epubeditor and used the function run above script to modify epub but no new epub was generated and I'm officially out of ideas from here onwards : "use strict";

//dead url/ parser parserFactory.register("storyseedling.com", () => new StorySeedlingParser());

class StorySeedlingParser extends Parser { constructor() { super(); }

async getChapterUrls(dom) {
    return [...dom.querySelectorAll("main .grid.w-full a")]
        .map(link => this.linkToChapter(link));
}

linkToChapter(link) {
    let title = link.querySelector(".truncate").textContent;
    return ({
        sourceUrl:  link.href,
        title: title,
    });
}

findContent(dom) {
    return (
        dom.querySelector("div.prose .mb-4") || dom.querySelector("#chapter-content")
    );
}

populateUIImpl() {
    document.getElementById("removeAuthorNotesRow").hidden = false; 
}

preprocessRawDom(webPageDom) {
    let notes = webPageDom.querySelector("div.prose .mb-4:nth-of-type(2)");
    if ((notes != null) && !this.userPreferences.removeAuthorNotes.value) {
        this.tagAuthorNotes([notes]);
        this.findContent(webPageDom).appendChild(notes);
    }
}

extractTitleImpl(dom) {
    return dom.querySelector("h1");
}

extractAuthor(dom) {
    let authorLabel = dom.querySelector("div.leading-7 a");
    return authorLabel?.textContent ?? super.extractAuthor(dom);
}

findChapterTitle(dom) {
    return dom.querySelector(".truncate");
}

findCoverImageUrl(dom) {
    return util.getFirstImgSrc(dom, "div[x-data='']");
}

getInformationEpubItemChildNodes(dom) {
    return [...dom.querySelectorAll("div.order-2.mb-4")];
}

}

readingthings8-cell avatar Dec 22 '25 13:12 readingthings8-cell