Skip to content

Commit

Permalink
Merge pull request #1495 from gamebeaker/fix-GenesiStudioParser
Browse files Browse the repository at this point in the history
Fix genesi studio parser
  • Loading branch information
gamebeaker authored Sep 20, 2024
2 parents 00ecd05 + ddc40bb commit 1886f60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin/js/parsers/GenesiStudioParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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;
tmpids = data.nodes[2].data[tmpids].free;
tmpids = data.nodes[2].data[tmpids].free_chapters;
let freeChapterids = data.nodes[2].data[tmpids];

let returnchapters = freeChapterids.map(e => ({
Expand All @@ -34,10 +34,11 @@ class GenesiStudioParser extends Parser{
let newDoc = Parser.makeEmptyDocForContent(url);

this.appendElement(newDoc, "h1", this.titleFromJson(json));
this.appendContent(newDoc, json.nodes[2].data[json.nodes[2].data[0].content]);
let hash = json.nodes[2].data[json.nodes[2].data[0].akezmZmaAOMmegnQAlkRnalAJnr];
let content = json.nodes[2].data[json.nodes[2].data[0][hash]];
this.appendContent(newDoc, content);
let notes = json.nodes[2].data[json.nodes[2].data[0].footnotes];
if (notes !== null && notes != "") {
this.appendElement(newDoc, "h3", "Notes");
this.appendContent(newDoc, notes);
}
return newDoc.dom;
Expand Down

0 comments on commit 1886f60

Please sign in to comment.