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

Fix YoungJump: getting paid stuff #6103

Merged
merged 2 commits into from
Sep 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 10 additions & 26 deletions src/web/mjs/connectors/YoungJump.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,18 @@ export default class YoungJump extends SpeedBinb {
}

async _getMangas() {
return [
{
id: 'free_uj/',
title: 'ウルトラジャンプ - ultra jump'
},
{
id: 'free_yj/',
title: 'ヤングジャンプ - young jump'
}
];
const request = new Request('https://www.youngjump.world/yj-rest-apis/getBookInfo.php', this.requestOptions);
MikeZeDev marked this conversation as resolved.
Show resolved Hide resolved
MikeZeDev marked this conversation as resolved.
Show resolved Hide resolved
const data = await this.fetchJSON(request);
return data.map(magazine => {
return {
id: magazine.url,
title : `${magazine.issue} - ${magazine.number}`
};
});

}

async _getChapters(manga) {
const request = new Request(new URL(manga.id, this.url), this.requestOptions);
const data = await this.fetchDOM(request);

let chapters = [];
for (const year of data.querySelectorAll('section.sp-w')) {
const mangas = [...year.querySelectorAll('a.p-my__list-link')];
chapters.push(...mangas.map(element => {
return {
id: this.getAbsolutePath(element.href, this.url),
title: year.querySelector('h3').innerText.trim() +' - ' + element.querySelector('h4').innerText.trim()
};
}));
}

return chapters;
return [{id: manga.id, title : manga.title}];
}

}
Loading