From 355953eb4ae31410789fbe4ef1028f72718eeac6 Mon Sep 17 00:00:00 2001 From: himanshu8443 Date: Fri, 4 Jul 2025 18:53:36 +0530 Subject: [PATCH] fix: enhance metadata fetching logic and improve selector for episodes --- dist/uhd/meta.js | 3 ++- providers/uhd/meta.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/uhd/meta.js b/dist/uhd/meta.js index ab52730..20ab4ae 100644 --- a/dist/uhd/meta.js +++ b/dist/uhd/meta.js @@ -30,6 +30,7 @@ const getMeta = function (_a) { var _b; try { const { axios, cheerio } = providerContext; + console.log("Fetching metadata from UHD...", link, providerContext); const url = link; const res = yield axios.get(url, { headers }); const html = yield res.data; @@ -41,7 +42,7 @@ const getMeta = function (_a) { // Links const episodes = []; // new structure - $(".mks_separator").each((index, element) => { + $(".mks_separator,p:contains('mks_separator')").each((index, element) => { $(element) .nextUntil(".mks_separator") .each((index, element) => { diff --git a/providers/uhd/meta.ts b/providers/uhd/meta.ts index 06cf79c..876f4ff 100644 --- a/providers/uhd/meta.ts +++ b/providers/uhd/meta.ts @@ -28,6 +28,7 @@ export const getMeta = async function ({ }): Promise { 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) => {