mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:03:25 +00:00
add preferredHeaders to vidplay
This commit is contained in:
@@ -3,6 +3,7 @@ import { decodeData } from '@/providers/sources/vidsrcto/common';
|
|||||||
import { EmbedScrapeContext } from '@/utils/context';
|
import { EmbedScrapeContext } from '@/utils/context';
|
||||||
|
|
||||||
export const vidplayBase = 'https://vidplay.site';
|
export const vidplayBase = 'https://vidplay.site';
|
||||||
|
export const referer = 'https://vidplay.online/';
|
||||||
|
|
||||||
// This file is based on https://github.com/Ciarands/vidsrc-to-resolver/blob/dffa45e726a4b944cb9af0c9e7630476c93c0213/vidsrc.py#L16
|
// This file is based on https://github.com/Ciarands/vidsrc-to-resolver/blob/dffa45e726a4b944cb9af0c9e7630476c93c0213/vidsrc.py#L16
|
||||||
// Full credits to @Ciarands!
|
// Full credits to @Ciarands!
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
import { makeEmbed } from '@/providers/base';
|
import { makeEmbed } from '@/providers/base';
|
||||||
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
|
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
|
||||||
|
|
||||||
import { getFileUrl } from './common';
|
import { getFileUrl, referer } from './common';
|
||||||
import { SubtitleResult, VidplaySourceResponse } from './types';
|
import { SubtitleResult, VidplaySourceResponse } from './types';
|
||||||
|
|
||||||
export const vidplayScraper = makeEmbed({
|
export const vidplayScraper = makeEmbed({
|
||||||
@@ -46,6 +47,10 @@ export const vidplayScraper = makeEmbed({
|
|||||||
playlist: source,
|
playlist: source,
|
||||||
flags: [],
|
flags: [],
|
||||||
captions,
|
captions,
|
||||||
|
preferredHeaders: {
|
||||||
|
Referer: referer,
|
||||||
|
Origin: referer,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user