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 MangaFire : filter api junk #6361

Merged
merged 2 commits into from
Oct 26, 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
17 changes: 9 additions & 8 deletions src/web/mjs/connectors/MangaFire.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,16 @@ export default class MangaFire extends Connector {
const data = await this.fetchJSON(request);
const dom = this.createDOM(data.result.html);
const chaptersNodes = [...dom.querySelectorAll('a')];
chaptersNodes.map(chapter => {
const id = {itemid : chapter.dataset.id, itemtype : type};
const title = chapter.text.trim();
chapterList.push ({
id : JSON.stringify(id),
title : title,
language : language
chaptersNodes.filter(anchor=> anchor.pathname.includes(`/${type}-`))
.map(chapter => {
MikeZeDev marked this conversation as resolved.
Show resolved Hide resolved
const id = {itemid : chapter.dataset.id, itemtype : type};
const title = chapter.text.trim();
chapterList.push ({
id : JSON.stringify(id),
title : title,
language : language
});
});
});
}
}
return chapterList;
Expand Down
Loading