Skip to content

Commit

Permalink
Merge pull request #1603 from ImLJS/dev
Browse files Browse the repository at this point in the history
Update Mvlempyr Chapter Titles
  • Loading branch information
ImLJS authored Dec 16, 2024
2 parents e7b6fc9 + c28227c commit 9a01919
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/js/parsers/MvlempyrParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ class MvlempyrParser extends Parser {
let imgLink = dom.querySelector("div.novel-image-wrapper img").src;
let slug = imgLink.split("/").pop().split(".")[0];
let chapterCount = parseInt(dom.querySelector("div#chapter-count").textContent);
let chapterTitles = [...dom.querySelectorAll("div.chapter-item h3")].map((el) => el.textContent.replace(/^\d+\.\s*/, ""));

let chapterList = [];

for (let i = 1; i <= chapterCount; i++) {
let link = `https://www.mvlempyr.com/chapter/${slug}-${i}`;
chapterList.push({
sourceUrl: link,
title: "[placeholder]",
title: chapterTitles[i-1],
});
}
return chapterList;
Expand Down

0 comments on commit 9a01919

Please sign in to comment.