-
Notifications
You must be signed in to change notification settings - Fork 476
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
base: master
Are you sure you want to change the base?
Conversation
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 :) |
Ofcourse you can review the code, is this what Github was made for? |
Speak of the devil they just changed their domain |
|
There was a problem hiding this 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 ^^
src/web/mjs/connectors/Erosscan.mjs
Outdated
super.id = 'erosscans'; | ||
super.label = 'Eros Scan'; | ||
this.tags = [ 'webtoon', 'english' ]; | ||
this.url = 'https://erosxcomic.xyz/'; |
There was a problem hiding this comment.
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 ?
this.config = { |
config, url, and _initializeConnector
@@ -0,0 +1,46 @@ | |||
import Connector from '../engine/Connector.mjs'; | |||
|
There was a problem hiding this comment.
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 🙏
There was a problem hiding this comment.
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?
src/web/mjs/connectors/Erosscan.mjs
Outdated
} | ||
|
||
async _getMangas() { | ||
let request = new Request(this.url + '/manga/list-mode/', this.requestOptions); |
There was a problem hiding this comment.
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.
- Import WordpressMangastream
- Use WordPressMangaStream as parent class
- Fill website infos
- 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 { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remarks than Eros.
src/web/mjs/connectors/TernoScan.mjs
Outdated
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; |
There was a problem hiding this comment.
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.
async _getPages(chapter) { |
No description provided.