Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add genesi studio parser #1466

Merged

Conversation

gamebeaker
Copy link
Collaborator

@dteviot reference: #1423

I have a problem:
I set the Chapterlist links to the api links e.g.: https://genesistudio.com/viewer/6213/__data.json
and in findContent() i want to extract the content from the json response but at the moment it fails i think the problem is that it is not valid html is there a solution for this problem?
A "hack" would be i set the links in Chapterlist to a valid HTML page e.g. https://genesistudio.com/viewer/6213 and than in the function findContent()
let data = (await HttpClient.fetchJson(dom.baseURI + "/__data.json")).json;
but i don't think this is the right approach.

@gamebeaker
Copy link
Collaborator Author

@dteviot i think i got it i overload async fetchChapter(url) i got inspiration from here: https://github.com/dteviot/WebToEpub/blob/ExperimentalTabMode/plugin/js/parsers/InoveltranslationParser.js#L53

@gamebeaker
Copy link
Collaborator Author

@gamebeaker gamebeaker changed the title Do not merge !!! Add genesi studio parser Add genesi studio parser Sep 7, 2024
@gamebeaker gamebeaker merged commit 2629b39 into dteviot:ExperimentalTabMode Sep 7, 2024
1 check passed
@dteviot
Copy link
Owner

dteviot commented Sep 8, 2024

@gamebeaker

Wow. Thank you for your hard work.

@dteviot i think i got it i overload async fetchChapter(url) i got inspiration from here: https://github.com/dteviot/WebToEpub/blob/ExperimentalTabMode/plugin/js/parsers/InoveltranslationParser.js#L53

That's the way I would do it.

Please note, you can't assign to innerHTML in a Firefox extension. The automated checker won't accept it, because it can't validate the HTML is safe. I've pushed a correction. And taken the liberty to refactor titleFormJson() and findCoverImageUrl()
cf458e0

Tested with:

@gamebeaker gamebeaker deleted the Add-GenesiStudioParser branch September 22, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants