mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-06-17 20:28:37 +00:00
fix multiple providers
This commit is contained in:
@@ -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 }];
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user