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

Adding TernoScans and ErosScan #7658

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bazket571
Copy link

No description provided.

@MikeZeDev
Copy link
Contributor

Hello. thanks for your contribution but are you aware those websites change domain like 2 times a week and it will be a pain to maintain ?

If you really want i can review the code, there are quite some things to fix :)

@Bazket571
Copy link
Author

Ofcourse you can review the code, is this what Github was made for?
Not gonna lie I made this for an one time download so I didn't aware they change their domain so frequently, but if we can somehow get the image link directly without the domain regex that would be great.
The image link is stored directly on the website in a script tag starts with ts_reader.run. Its in plain text for Eros but for Terno its in base64
For the site URL, I think all those domains are aliases to each other.

@Bazket571
Copy link
Author

Speak of the devil they just changed their domain

@MikeZeDev
Copy link
Contributor

MikeZeDev commented Jan 12, 2025

  1. Pay attention to indentation, use things like eslint
  2. Those sites use a theme we call "Mangastream" look for similar websites in source code base instead of reinventing the wheel :)

Copy link
Contributor

@MikeZeDev MikeZeDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you do it like other MangaStream websites, and fix that ugly indentation ^^

super.id = 'erosscans';
super.label = 'Eros Scan';
this.tags = [ 'webtoon', 'english' ];
this.url = 'https://erosxcomic.xyz/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is the problem that they change domain every weeks, perhaps 2 times a week.

See how to add a url setting ?

config, url, and _initializeConnector

@@ -0,0 +1,46 @@
import Connector from '../engine/Connector.mjs';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation in the whole file 🙏

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me what's wrong with the indentation?

}

async _getMangas() {
let request = new Request(this.url + '/manga/list-mode/', this.requestOptions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this website is using what we call "Mangastream" there is no need for all this code.

  1. Import WordpressMangastream
  2. Use WordPressMangaStream as parent class
  3. Fill website infos
  4. Make sure it works. In case something doesnt work, write your own _getMangas,_getChapters, whatever...

Example :

import Connector from '../engine/Connector.mjs';

export default class Erosscans extends Connector {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remarks than Eros.

async _getPages(chapter) {
let request = new Request(this.url + chapter.id, this.requestOptions);
let scripts = await this.fetchDOM(request, "script");
let reg = /(https:\\\/\\\/tecnocomic.xyz\\\/wp-content\\\/[^\"]+)/g;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did you see b64 pictures? Arent those placeholders because of lazy loading?

By default, WordPressMangaStream execute Javascript on the chapter page to get pages url from ts_reader itself.

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