Skip to content

Commit

Permalink
Fix YoungJump: getting paid stuff (#6103)
Browse files Browse the repository at this point in the history
* Fix YoungJump: getting paid stuff

* no more free content on website
* you can get magazines after being subscribed and logged (meaning ofc legally purchased)

* Update YoungJump.mjs
  • Loading branch information
MikeZeDev authored and Sheepux committed Jan 2, 2024
1 parent 7c46b88 commit 240e67b
Showing 1 changed file with 10 additions and 26 deletions.
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(`${this.url}/yj-rest-apis/getBookInfo.php`, this.requestOptions);
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}];
}

}

0 comments on commit 240e67b

Please sign in to comment.