dteviot / WebToEpub

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

Added MTLNovels support #1558

Closed maforn closed 1 month ago

maforn commented 1 month ago

Closes #1545 I've added a new script and changed the way it fetches the chapters from MTLNovels, as of now they are not giving back the urls in a json anymore. Now the scripts scrapes the chapter list url and gets all the chapters from it.
I've tested it and it works (for me), as specified in contributing all the tests pass, I've also added my name to the contributors list.
Let me know if there are any further changes or tests that I need to make. By the way, thank you for your work, it's an amazing idea.

gamebeaker commented 1 month ago

@maforn can you please remove the changes made to plugin/jszip/dist/jszip.min.js?

maforn commented 1 month ago

Done, it updated automatically

dteviot commented 1 month ago

@maforn

You should remove the existing file MtlnovelParser.js and its reference in popup.html. Either that, or edit MtlnovelParser.js and remove MtlnovelsParser.js. Either is fine with me. Also, if you can provide a Pull Request that doesn't modify and then revert jszip.min.js that would be much appreciated. Maybe its my OCD, but I dislike bloating Git with unnecessary binary file changes.

dteviot commented 1 month ago

@maforn And thank you for your hard work

maforn commented 1 month ago

@dteviot I've already removed the jszip file changes, maybe this rule should be added to the .gitignore? I did not remove MTLNovelParser.js because it still works for mtlnovel.com (example). Do I still have to remove or rename it?

dteviot commented 1 month ago

@maforn

I've already removed the jszip file changes,

You reverted the change. There are two commits, one with the initial change, the second with jszip being reverted. I'm suggesting using a --force-with-lease to cleanup the commit. Or do a squash.

maybe this rule should be added to the .gitignore

It's complicated. How to handle the library goes round and round. Personally, as a library, I think it should be either a sub-module or brought in via packages. But that makes it difficult for newbies to build.

I did not remove MTLNovelParser.js because it still works for mtlnovel.com

Ah. My mistake, I changed MTLNovelParser.js, but did not commit it due to issues with site. Note, that .mtlnovel.com and .mtlnovels.com seem to be the same site, just different aliases. So, should be just one parser for both.

Also, site seems to still be broken. If I browse to https://es.mtlnovel.com/hello-changan/, the chapters 1-250, 251-500 and 501-670 don't work. (Clicking on them to expand shows nothing.) And there's a comment dated two days ago complaining the site doesn't work.

maforn commented 1 month ago

@dteviot I've made all the changes that you requested, renaming the parser and removing the reverting commit. The only problem is that some novels in the website have the chapter list section duplicated, so sometimes it does show double the number of chapters. There is nothing we can do about that, it's just their website that is a bit broken.

dteviot commented 1 month ago

@maforn

Thank you again for your efforts.

maforn commented 1 month ago

You're welcome! And thank you for your hard work.