Skip to content

Commit

Permalink
Fix ep no
Browse files Browse the repository at this point in the history
  • Loading branch information
OshekharO authored Jan 15, 2024
1 parent 8691e9f commit ed1ca92
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions repo/stream.mkvdrama.org.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,17 @@ export default class extends Extension {
const cover = await this.querySelector(res, "meta[property='og:image']").getAttributeText("content");
const desc = await this.querySelector(res, "div.content-more-js > p").text;

const episodes = [];
const epiList = await this.querySelectorAll(res, "div.episode-grid > article");

for (const element of epiList) {
const html = await element.content;
const name = await this.querySelector(html, "h2.episode-title").text;
console.log(name);
const url = await this.getAttributeText(html, "a", "href");
const episodes = [];
const epiList = res.match(/<article class="episode-card">([\s\S]+?)<\/article>/g);

epiList.forEach((element) => {
const name = element.match(/<h2.*><h2.*>(.+?)<\/h2>/)[1];
const url = element.match(/href="([^"]+)"/)[1];
episodes.push({
name: name.trim(),
url,
name,
url,
});
}
});

return {
title: title.trim(),
Expand Down Expand Up @@ -125,4 +123,4 @@ export default class extends Extension {
}
};
}
}
}

0 comments on commit ed1ca92

Please sign in to comment.