dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
682 stars 133 forks source link

Please add site https://genesistudio.com #1423

Open nandakishore2009 opened 1 month ago

nandakishore2009 commented 1 month ago

Hi. https://genesistls.com is changed to https://genesistudio.com The site is fully revamped and the extension not working. Is there a chance of supporting it again? Thanks

dteviot commented 1 month ago

@nandakishore2009 Sorry, site is doing things to disable the site when it detects dev tools being used. This makes it difficult to write a parser for the site. I could probably work around by using Fiddler, but to me it's not worth the effort.

Time taken: 14 minutes

gamebeaker commented 1 month ago

It looks like they use this here to prevent it: https://github.com/theajack/disable-devtool It looks like they use this "hack" tldr: print in console and clear console if it takes to long console is open. To prevent this js from loading you can block it with uBlock Origin. I blocked this url and it looks like it works: https://genesistudio.com/_app/immutable/chunks/disable-devtool*

dteviot commented 1 month ago

@gamebeaker

Thank you for your efforts. Unfortunately, the Google rules are that Chrome extensions are not allowed to circumvent copyright protection measures. And I suspect the site is doing this for at least partly this reason.

So, not going to support this site in version released to stores. But might do it for the experimental builds. Will take a look at the site for curiosity's sake.

dteviot commented 1 month ago

@gamebeaker

For my future reference, how did you figure this out?

dteviot commented 1 month ago

Looking at the network traffic now. To get content for a chapter, is POSTing a REST call, to https://analytics.genesistudio.com/api/send with URL in the JSON "/viewer/723", which is same as the hyperlink for chapters. But there's other stuff in the payload. But it looks like the response is encrypted. So, this is another site where you'd probably need to load each page normally, let the browser unscramble the text and then extract it.

So, not going be able to handle this site. It's job for a different tool.

gamebeaker commented 1 month ago

@dteviot I first tried to open dev tools -> that didn't work (I used the shortcut CTRL+Shift+E to open them). I googled how to detect dev tools open and found this https://stackoverflow.com/questions/7798748/find-out-whether-chrome-console-is-open/24327093#24327093 answer. I realized that To test if this method is used i prevented the console from clearing in firefox image After opening the page the console looked like this. image At the bottom is this link https://theajack.github.io/disable-devtool/404.html?h=genesistudio.com I went to his github and found this tool: https://github.com/theajack/disable-devtool I enabled persisten logs in the network tab of the dev tools image I searched the Network requests after disable-devtool and found the network request: https://genesistudio.com/_app/immutable/chunks/disable-devtool.min.DS0Hrg-C.js I am not sure if the end DS0Hrg-C is dynamic. That is why the uBlock Origin filter is https://genesistudio.com/_app/immutable/chunks/disable-devtool*

gamebeaker commented 1 month ago

@dteviot

Looking at the network traffic now. To get content for a chapter, is POSTing a REST call, to https://analytics.genesistudio.com/api/send with URL in the JSON "/viewer/723", which is same as the hyperlink for chapters. But there's other stuff in the payload. But it looks like the response is encrypted. So, this is another site where you'd probably need to load each page normally, let the browser unscramble the text and then extract it.

So, not going be able to handle this site. It's job for a different tool.

I don't think it is encrypted. In my opinion it doesn't get the content from the api but a nomal get request from the Chapter url https://genesistudio.com/viewer/1099 but it is similar to #1403 reaperscans.com as in it is buried in script elements.

gamebeaker commented 2 weeks ago

@nandakishore2009 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. Tested with: