fix multiple providers

This commit is contained in:
Himanshu
2026-05-11 21:50:15 +05:30
parent 2ce3c737d1
commit 8c161715f7
21 changed files with 82 additions and 38 deletions
+11 -1
View File
@@ -74,8 +74,18 @@ export const getEpisodes = async function ({
}
});
}
if (episodeLinks.length === 0) {
// https://hubcloud.foo/drive/gvdzmpioeeaf8mp
// find link contain hubcloud and have drive in url using regex
const hubcloudLink = html.match(
/https:\/\/hubcloud\.[^\/]+\/drive\/[^"'\s]+/i,
)?.[0];
if (hubcloudLink) {
episodeLinks.push({ title: "Play", link: hubcloudLink });
}
}
// console.log(episodeLinks);
console.log("episodeLinks:", episodeLinks);
return episodeLinks.length > 0
? episodeLinks
: [{ title: "Play", link: url }];
-1
View File
@@ -56,7 +56,6 @@ async function posts({
const title = $(element).find(".poster-title").text();
const link = $(element).parent().attr("href");
const image = $(element).find(".poster-image img").attr("src");
console.log({ title, link, image });
if (title && link && image) {
catalog.push({
title: title.replace("Download", "").trim(),