mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:43:26 +00:00
Merge branch 'dev' into dev
This commit is contained in:
@@ -110,7 +110,7 @@ export const upcloudScraper = makeEmbed({
|
||||
if (track.kind !== 'captions') return;
|
||||
const type = getCaptionTypeFromUrl(track.file);
|
||||
if (!type) return;
|
||||
const language = labelToLanguageCode(track.label);
|
||||
const language = labelToLanguageCode(track.label.split(' ')[0]);
|
||||
if (!language) return;
|
||||
captions.push({
|
||||
id: track.file,
|
||||
|
@@ -28,9 +28,9 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
||||
const showPageResult = await ctx.proxiedFetcher<string>(`/${show.fullSlug}`, {
|
||||
baseUrl: ridoMoviesBase,
|
||||
});
|
||||
const fullEpisodeSlug = `${show.fullSlug}/season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`;
|
||||
const fullEpisodeSlug = `season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`;
|
||||
const regexPattern = new RegExp(
|
||||
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"${fullEpisodeSlug}\\\\\\")`,
|
||||
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"[^"]*${fullEpisodeSlug}[^"]*\\\\\\")`,
|
||||
'g',
|
||||
);
|
||||
const matches = [...showPageResult.matchAll(regexPattern)];
|
||||
|
Reference in New Issue
Block a user