mirror of
https://github.com/sussy-code/providers.git
synced 2026-03-11 17:55:37 +00:00
add preferredHeaders to vidplay
This commit is contained in:
parent
e1f23f571d
commit
1dc7c879af
2 changed files with 7 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { decodeData } from '@/providers/sources/vidsrcto/common';
|
|||
import { EmbedScrapeContext } from '@/utils/context';
|
||||
|
||||
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
|
||||
// Full credits to @Ciarands!
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { makeEmbed } from '@/providers/base';
|
||||
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
|
||||
|
||||
import { getFileUrl } from './common';
|
||||
import { getFileUrl, referer } from './common';
|
||||
import { SubtitleResult, VidplaySourceResponse } from './types';
|
||||
|
||||
export const vidplayScraper = makeEmbed({
|
||||
|
|
@ -46,6 +47,10 @@ export const vidplayScraper = makeEmbed({
|
|||
playlist: source,
|
||||
flags: [],
|
||||
captions,
|
||||
preferredHeaders: {
|
||||
Referer: referer,
|
||||
Origin: referer,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue