WebToEpub icon indicating copy to clipboard operation
WebToEpub copied to clipboard

Please add site https://genesistudio.com

Open michaelnyc17 opened this issue 1 year ago • 11 comments

Please note, I'm basically the only developer working on WebToEpub, and I'm not paid for doing this. (WebToEpub is completely free, and generates no money.) By asking to add a site, you're asking me to give you some of my limited free time. So, I think it's not unreasonable for me to ask you to do as much as you can to help me.

Provide URL for web page that contains Table of Contents (list of chapters) of a typical story on the site

https://genesistudio.com/novels/dlh

Did you try using the Default Parser for the site? If not, why not?

Instructions for using the default parser can be found at https://dteviot.github.io/Projects/webToEpub_DefaultParser.html

What settings did you use? What didn't work?

  • URL of first chapter
  • CSS selector for element holding content to put into EPUB
  • CSS selector for element holding Title of Chapter
  • CSS selector for element(s) to remove

If the Default Parser did not work, if you have developer skills, did you try writing a new parser?

Instructions https://dteviot.github.io/Projects/webToEpub_FAQ.html#write-parser

If you don't have developer skills, can you ask a friend who does have them if they can do it for you?

If you tried writing a parser, and it doesn't work. Attach the parser here.

michaelnyc17 avatar Sep 28 '24 19:09 michaelnyc17

reference: #1495

gamebeaker avatar Sep 28 '24 19:09 gamebeaker

@Displayeddd will not be supported. Why? The api returns js which needs to be executed.

gamebeaker avatar Sep 28 '24 19:09 gamebeaker

@Displayeddd Test versions for Firefox and Chrome have been uploaded to https://github.com/dteviot/WebToEpub/releases/tag/developer-build. Pick the one suitable for you, follow the "How to install from Source (for people who are not developers)" instructions at https://github.com/dteviot/WebToEpub/tree/ExperimentalTabMode#user-content-how-to-install-from-source-for-people-who-are-not-developers and let me know how it goes.

gamebeaker avatar Sep 29 '24 15:09 gamebeaker

Works, though on the extension page it says [placeholder] for all the chapters, you can still read them. image

michaelnyc17 avatar Sep 29 '24 16:09 michaelnyc17

@Displayeddd in the finished epub are the right title. Or more like should be if you find an error please write here.

gamebeaker avatar Sep 29 '24 17:09 gamebeaker

@Displayeddd New test versions for Firefox and Chrome have been uploaded to https://github.com/dteviot/WebToEpub/releases/tag/developer-build. Pick the one suitable for you, follow the "How to install from Source (for people who are not developers)" instructions at https://github.com/dteviot/WebToEpub/tree/ExperimentalTabMode#user-content-how-to-install-from-source-for-people-who-are-not-developers and let me know how it goes.

gamebeaker avatar Sep 30 '24 15:09 gamebeaker

Is again broken i have the feeling they make changes each time i update. I will wait 1 week before i attempt again.

gamebeaker avatar Sep 30 '24 19:09 gamebeaker

I took a crack at this today. Not sure if they will update this further but this is the diff of my change that work

diff --git a/plugin/js/parsers/GenesiStudioParser.js b/plugin/js/parsers/GenesiStudioParser.js
index 6238cbf..85c65a6 100644
--- a/plugin/js/parsers/GenesiStudioParser.js
+++ b/plugin/js/parsers/GenesiStudioParser.js
@@ -17,7 +17,7 @@ class GenesiStudioParser extends Parser{

     async getChapterUrls(dom) {
         let data = (await HttpClient.fetchJson(dom.baseURI + "/__data.json")).json;
-        let tmpids = data.nodes[2].data[0].chapters;
+        let tmpids = data.nodes[2].data[0].chapters_list;
         let jsdata = data.nodes[2].data[tmpids];
         let extractfreechapter = [...jsdata.match(/return{.*}}],/)[0].matchAll(/'id':0.*?,/g)];
         let freechapterids = extractfreechapter.map(e => Number(e[0].replace("'id':","").replace(",","")));
@@ -35,7 +35,7 @@ class GenesiStudioParser extends Parser{
         let newDoc = Parser.makeEmptyDocForContent(url);

         this.appendElement(newDoc, "h1", this.titleFromJson(json));
-        let index = json.nodes[2].data[0].content;
+        let index = json.nodes[2].data[0].gs;
         let content = json.nodes[2].data[index];
         this.appendContent(newDoc, content);
         let notes = json.nodes[2].data[json.nodes[2].data[0].footnotes];

dnshipit avatar Oct 06 '24 16:10 dnshipit

I took a crack at this today. Not sure if they will update this further but this is the diff of my change that work

Does this still work for you? I tried your revisions and it didn't work for me. Genesis' constant battle against scrapers is funny, especially how they're trying to pass themselves off as a business. I get the feeling they're hoping to turn into a publisher like Webnovel.

Tenome avatar Oct 09 '24 02:10 Tenome

They did do minor changes again. Depends on how thing go, we might just want to filter their object instead of trusting fixed string.

Here is the new diff that work for me. Grab it quick while it's still working I guess @Tenome

diff --git a/plugin/js/parsers/GenesiStudioParser.js b/plugin/js/parsers/GenesiStudioParser.js
index 6238cbf..a9314a9 100644
--- a/plugin/js/parsers/GenesiStudioParser.js
+++ b/plugin/js/parsers/GenesiStudioParser.js
@@ -17,7 +17,7 @@ class GenesiStudioParser extends Parser{

     async getChapterUrls(dom) {
         let data = (await HttpClient.fetchJson(dom.baseURI + "/__data.json")).json;
-        let tmpids = data.nodes[2].data[0].chapters;
+        let tmpids = data.nodes[2].data[0].clist;
         let jsdata = data.nodes[2].data[tmpids];
         let extractfreechapter = [...jsdata.match(/return{.*}}],/)[0].matchAll(/'id':0.*?,/g)];
         let freechapterids = extractfreechapter.map(e => Number(e[0].replace("'id':","").replace(",","")));
@@ -35,7 +35,7 @@ class GenesiStudioParser extends Parser{
         let newDoc = Parser.makeEmptyDocForContent(url);

         this.appendElement(newDoc, "h1", this.titleFromJson(json));
-        let index = json.nodes[2].data[0].content;
+        let index = json.nodes[2].data[0].chapter_content;
         let content = json.nodes[2].data[index];
         this.appendContent(newDoc, content);
         let notes = json.nodes[2].data[json.nodes[2].data[0].footnotes];
(END)

dnshipit avatar Oct 09 '24 05:10 dnshipit

Can confirm that this is still down. Attempting to export a novel results in the following error:

freeChapterids is undefined getChapterUrls@moz-extension://100d44ce-fa35-4740-a2bc-d6a652012b85/js/parsers/GenesiStudioParser.js:24:30

pyrusmole avatar Oct 20 '24 00:10 pyrusmole

Test versions for Firefox and Chrome have been uploaded to https://github.com/dteviot/WebToEpub/releases/tag/developer-build. Pick the one suitable for you, follow the "How to install from Source" instructions at https://github.com/dteviot/WebToEpub/tree/ExperimentalTabMode#user-content-installation and let me know how it goes.

gamebeaker avatar Apr 12 '25 17:04 gamebeaker

@pyrusmole @Tenome @dnshipit

Updated version (1.0.5.0) has been submitted to Firefox and Chrome stores. Firefox version is available now. Chrome might be available in a few hours (typical) to 21 days.

dteviot avatar Apr 27 '25 05:04 dteviot