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

Support other sites / providers #6

Open
agilgur5 opened this issue May 19, 2019 · 2 comments
Open

Support other sites / providers #6

agilgur5 opened this issue May 19, 2019 · 2 comments
Labels
feature New feature or request
Milestone

Comments

@agilgur5
Copy link
Owner

agilgur5 commented May 19, 2019

Currently only 1 site is supported. There should be a way to switch providers and support for at least a few.

Ideally a handful would be supported out-of-the-box and others available via plugins.
Tachiyomi has various providers available via separate repos and APK downloads. I think the latest release is a "clean" version with no providers available out-of-the-box.
Would be cool if provider plugins could be added via something similar to Code Push, that doesn't require a new install. Obviously warnings need to be given up-front about potentially hazardous code distributed by others (alternatively keep a safe list?).

See also #1 - provider plugins are not currently public - Tachiyomi's are though

@agilgur5
Copy link
Owner Author

So I gave this a go trying to implement one more provider (probably not the easiest one) and this is definitely going to require some refactoring.

The api.js file will almost certainly have to change as some providers may require multiple fetches to get certain data or might require the current URL or might require Cookies etc etc to retrieve their data. We may need to change some of the UI code as well around page vs. image, as not all providers seem to be formatted as such.

Another big detail is that the persisted mangas don't currently list their provider. They do have a link, so provider can probably be inferred from that though (so long as like domain is included in the link). It might be wise to add a provider field to all manga. Similarly might have to refactor some code to account for which provider to use.


I think it would be wise to re-write the tachiyomi-extensions scraping code in JS as they've probably gone through a lot of iterations to get to a more ideal design, so can follow their lead instead of running into the same bugs they might once have run into. Tachiyomi also has a lot more usage, so they're likely quicker to update scrapers and that means we can likely base fixes off of theirs.
While Tachiyomi is all Kotlin and requires rewriting in JS, it is also Apache licensed, so compatible in any case.

For some providers, Tachiyomi has some more complicated logic, so I'm also guessing we'll run into the same issues here, and those will likely require even more refactoring to handle.


Another relevant note is that most errors seem to be swallowed by MST, possibly by the async flow handling, and this may or may not be on purpose (so that reactions etc don't just break based on some potentially related issues I was reading). This also explains why I wasn't getting errors when chapters / pages / images sometimes fail to fetch (usually because the list is empty on the provider). Might need to move error handling temporarily or permanently into actions and might want to file an issue / ask a question at MST about this as nothing pops up on the topic of "swallowing" errors.

@agilgur5
Copy link
Owner Author

agilgur5 commented Dec 3, 2024

See also consumet.ts as a high level API/SDK for multiple providers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant