dteviot / WebToEpub

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

Tapas.io error #1368

Closed Wilhelmia closed 6 days ago

Wilhelmia commented 1 month ago

Describe the bug When I go to Tapas.io and try to get an epub from their novel page I get an error. Until last week it worked very well and I could fetch some epubs, now the error looks like this:

Error: Fetch of URL 'https://tapas.io/series/266599/episodes?page=1&sort=OLDEST&max_limit=9999' failed with network error 500. at FetchErrorHandler.onResponseError (chrome-extension://akiljllkbielkidmammnifcnibaigelm/js/HttpClient.js:32:25) at HttpClient.checkResponseAndGetData (chrome-extension://akiljllkbielkidmammnifcnibaigelm/js/HttpClient.js:192:45) at HttpClient.wrapFetchImpl (chrome-extension://akiljllkbielkidmammnifcnibaigelm/js/HttpClient.js:182:31) at async TapasParser.getChapterUrls (chrome-extension://akiljllkbielkidmammnifcnibaigelm/js/parsers/TapasParser.js:14:21)

Screenshots image

Desktop (please complete the following information):

Kiradien commented 1 month ago

Hmm, it looks like the api changed to not accept a max_limit greater than 20. https://tapas.io/series/266599/episodes?page=1&sort=OLDEST&max_limit=20 works, but 21 does not. The parser needs to be shifted to a more standardized pagenation format with multiple requests.

I may do a deeper peek into it a bit later, but it doesn't look like too bad to fix. Still, it's annoying that they gave a 500 error on that.

Kiradien commented 1 month ago

Hmm, might be more of a revamp than originally expected. It looks like most of the selectors across the parser might be invalid now, but I'm not sure I'm running it from the right view.

@Wilhelmia - can you confirm the url you opened WebToEpub from? Does the url match the following: https://tapas.io/series/villains-are-destined-to-die-novel ? Or was there a specific "table of contents" page?

Wilhelmia commented 1 month ago

Hmm, might be more of a revamp than originally expected. It looks like most of the selectors across the parser might be invalid now, but I'm not sure I'm running it from the right view.

@Wilhelmia - can you confirm the url you opened WebToEpub from? Does the url match the following: https://tapas.io/series/villains-are-destined-to-die-novel ? Or was there a specific "table of contents" page?

Hello! Thank you for looking into it. I open the special table of contents page which is this link: https://tapas.io/series/villains-are-destined-to-die-novel/info

image

japzone1 commented 1 month ago

As a temp workaround, I was able to get it working using the Default parser, at least for the novel "Master Villainess the Invincible!", though I had to cleanup a lot of things. Chapter titles had excessive whitespace by default and that carried over to excessively large filenames, which many ereaders cried foul over. So I had to copy the chapter list into a text editor and filter out the whitespaces. After that the EPUB was functional and I was able to import it into Calibre and edit the file to fix things like font colors, random elements that weren't removed, and cleanup the TOC to look nicer.

It would help if adding multiple selectors to the elements to remove box worked, but commas don't seem to work.

2024-07-04 16_37_30-Default-2021 - WebToEpub — Firefox Developer Edition 2024-07-04 16_38_36-Default-2021 - WebToEpub — Firefox Developer Edition

dteviot commented 1 month ago

@japzone1 You can use EpubEditor to do more extensive cleanup. See: https://github.com/dteviot/EpubEditor/issues/4

japzone1 commented 1 month ago

@japzone1 You can use EpubEditor to do more extensive cleanup. See: dteviot/EpubEditor#4

Thanks for the suggestion, currently Calibre's Editor works fine for me. It'd just be nice if I could remove multiple elements right from W2E's Default Parser. Right now it only seems to use the first CSS Selector entered. But that's off topic in this issue.

dteviot commented 1 month ago

@Wilhelmia @japzone1

@Kiradien's fix has been merged into the experimental branch.

Test versions for Firefox and Chrome have been uploaded to https://drive.google.com/drive/folders/1B_X2WcsaI_eg9yA-5bHJb8VeTZGKExl8?usp=sharing. 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:

japzone1 commented 1 month ago

@dteviot Seems to work in Firefox v128.0b7 for me. No issues with output that I've noticed so far.

dteviot commented 6 days ago

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

Wilhelmia commented 5 days ago

Thank you @dteviot! I tried the chrome version and could finally download some novels again. It worked fine for me on Vivaldi V6.8.3381.55. 😊