Update animeflv.ts

This commit is contained in:
Pas 2025-07-09 17:46:18 -06:00
parent 5d602e16b8
commit a71dbc16d8

View file

@ -10,7 +10,7 @@ const baseUrl = 'https://www3.animeflv.net';
async function searchAnimeFlv(ctx: ShowScrapeContext | MovieScrapeContext, title: string): Promise<string> {
const searchUrl = `${baseUrl}/browse?q=${encodeURIComponent(title)}`;
const html = await ctx.proxiedFetcher(searchUrl).then((r) => r.text());
const html = await ctx.proxiedFetcher(searchUrl);
const $ = load(html);
const results = $('div.Container ul.ListAnimes li article');
@ -39,7 +39,7 @@ async function getEpisodes(
ctx: ShowScrapeContext | MovieScrapeContext,
animeUrl: string,
): Promise<{ number: number; url: string }[]> {
const html = await ctx.proxiedFetcher(animeUrl).then((r) => r.text());
const html = await ctx.proxiedFetcher(animeUrl);
const $ = load(html);
let episodes: { number: number; url: string }[] = [];
@ -74,7 +74,7 @@ async function getEmbeds(
ctx: ShowScrapeContext | MovieScrapeContext,
episodeUrl: string,
): Promise<{ [key: string]: string | undefined }> {
const html = await ctx.proxiedFetcher(episodeUrl).then((r) => r.text());
const html = await ctx.proxiedFetcher(episodeUrl);
const $ = load(html);
// Busca el script que contiene la variable videos
@ -143,7 +143,7 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
episodeUrl = ep.url;
} else if (ctx.media.type === 'movie') {
const html = await ctx.proxiedFetcher(animeUrl).then((r) => r.text());
const html = await ctx.proxiedFetcher(animeUrl);
const $ = load(html);
let animeUri: string | null = null;