fix: enhance metadata fetching logic and improve selector for episodes

This commit is contained in:
himanshu8443
2025-07-04 18:53:36 +05:30
parent 3d92996ec3
commit 355953eb4a
2 changed files with 4 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ export const getMeta = async function ({
}): Promise<Info> {
try {
const { axios, cheerio } = providerContext;
console.log("Fetching metadata from UHD...", link, providerContext);
const url = link;
const res = await axios.get(url, { headers });
const html = await res.data;
@@ -43,7 +44,7 @@ export const getMeta = async function ({
const episodes: Link[] = [];
// new structure
$(".mks_separator").each((index, element) => {
$(".mks_separator,p:contains('mks_separator')").each((index, element) => {
$(element)
.nextUntil(".mks_separator")
.each((index, element) => {