mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:33:25 +00:00
Merge branch 'dev' into dev
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@movie-web/providers",
|
"name": "@movie-web/providers",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@movie-web/providers",
|
"name": "@movie-web/providers",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cheerio": "^1.0.0-rc.12",
|
"cheerio": "^1.0.0-rc.12",
|
||||||
|
@@ -110,7 +110,7 @@ export const upcloudScraper = makeEmbed({
|
|||||||
if (track.kind !== 'captions') return;
|
if (track.kind !== 'captions') return;
|
||||||
const type = getCaptionTypeFromUrl(track.file);
|
const type = getCaptionTypeFromUrl(track.file);
|
||||||
if (!type) return;
|
if (!type) return;
|
||||||
const language = labelToLanguageCode(track.label);
|
const language = labelToLanguageCode(track.label.split(' ')[0]);
|
||||||
if (!language) return;
|
if (!language) return;
|
||||||
captions.push({
|
captions.push({
|
||||||
id: track.file,
|
id: track.file,
|
||||||
|
@@ -28,9 +28,9 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
|||||||
const showPageResult = await ctx.proxiedFetcher<string>(`/${show.fullSlug}`, {
|
const showPageResult = await ctx.proxiedFetcher<string>(`/${show.fullSlug}`, {
|
||||||
baseUrl: ridoMoviesBase,
|
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(
|
const regexPattern = new RegExp(
|
||||||
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"${fullEpisodeSlug}\\\\\\")`,
|
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"[^"]*${fullEpisodeSlug}[^"]*\\\\\\")`,
|
||||||
'g',
|
'g',
|
||||||
);
|
);
|
||||||
const matches = [...showPageResult.matchAll(regexPattern)];
|
const matches = [...showPageResult.matchAll(regexPattern)];
|
||||||
|
Reference in New Issue
Block a user