chore(extractor): make VixSrc work without MediaFlow proxy
This commit is contained in:
parent
04b8987c30
commit
012b1648e1
14 changed files with 94 additions and 66 deletions
|
|
@ -7,7 +7,7 @@ import { VixSrc } from './VixSrc';
|
|||
const logger = winston.createLogger({ transports: [new winston.transports.Console({ level: 'nope' })] });
|
||||
const extractorRegistry = new ExtractorRegistry(logger, [new VixSrc(new FetcherMock(`${__dirname}/__fixtures__/VixSrc`))]);
|
||||
|
||||
const ctx = createTestContext({ mediaFlowProxyUrl: 'https://mediaflow-proxy.test', mediaFlowProxyPassword: 'asdfg', de: 'on', en: 'on', it: 'on' });
|
||||
const ctx = createTestContext({ de: 'on', en: 'on', it: 'on' });
|
||||
|
||||
describe('VixSrc', () => {
|
||||
test('Full Metal Jacket', async () => {
|
||||
|
|
@ -19,7 +19,7 @@ describe('VixSrc', () => {
|
|||
});
|
||||
|
||||
test('Black Mirror is excluded if no matching language was found', async () => {
|
||||
const ctx = createTestContext({ mediaFlowProxyUrl: 'https://mediaflow-proxy2.test', mediaFlowProxyPassword: 'asdfg', de: 'on' });
|
||||
const ctx = createTestContext({ de: 'on' });
|
||||
|
||||
expect(await extractorRegistry.handle(ctx, new URL('https://vixsrc.to/tv/42009/4/2'))).toMatchSnapshot();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,30 +1,38 @@
|
|||
import { Context, CountryCode, Format, Meta, UrlResult } from '../types';
|
||||
import {
|
||||
buildMediaFlowProxyExtractorStreamUrl, CustomRequestInit, guessHeightFromPlaylist,
|
||||
hasMultiEnabled,
|
||||
CustomRequestInit,
|
||||
guessHeightFromPlaylist,
|
||||
iso639FromCountryCode,
|
||||
supportsMediaFlowProxy,
|
||||
} from '../utils';
|
||||
import { Extractor } from './Extractor';
|
||||
|
||||
export class VixSrc extends Extractor {
|
||||
public readonly id = 'vixsrc';
|
||||
|
||||
public readonly label = 'VixSrc (via MediaFlow Proxy)';
|
||||
public readonly label = 'VixSrc';
|
||||
|
||||
public override viaMediaFlowProxy = true;
|
||||
public override readonly ttl: number = 21600000; // 6h
|
||||
|
||||
public supports(ctx: Context, url: URL): boolean {
|
||||
return null !== url.host.match(/vixsrc/) && supportsMediaFlowProxy(ctx);
|
||||
public supports(_ctx: Context, url: URL): boolean {
|
||||
return null !== url.host.match(/vixsrc/);
|
||||
}
|
||||
|
||||
protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise<UrlResult[]> {
|
||||
const playlistUrl = await buildMediaFlowProxyExtractorStreamUrl(ctx, this.fetcher, 'VixCloud', url);
|
||||
const countryCodes = await this.determineCountryCodesFromPlaylist(ctx, playlistUrl, { headers: { Referer: url.href }, queueLimit: 4 });
|
||||
const headers = { Referer: url.href };
|
||||
|
||||
if (!hasMultiEnabled(ctx.config) && !countryCodes.some(countryCode => countryCode in ctx.config)) {
|
||||
return [];
|
||||
}
|
||||
const html = await this.fetcher.text(ctx, url);
|
||||
|
||||
const tokenMatch = html.match(/['"]token['"]: ?['"](.*?)['"]/) as string[];
|
||||
const expiresMatch = html.match(/['"]expires['"]: ?['"](.*?)['"]/) as string[];
|
||||
const urlMatch = html.match(/url: ?['"](.*?)['"]/) as string[];
|
||||
|
||||
const baseUrl = new URL(`${urlMatch[1]}`);
|
||||
const playlistUrl = new URL(`${baseUrl.origin}${baseUrl.pathname}.m3u8?${baseUrl.searchParams}`);
|
||||
playlistUrl.searchParams.append('token', tokenMatch[1] as string);
|
||||
playlistUrl.searchParams.append('expires', expiresMatch[1] as string);
|
||||
playlistUrl.searchParams.append('h', '1');
|
||||
|
||||
const countryCodes = await this.determineCountryCodesFromPlaylist(ctx, playlistUrl, { headers });
|
||||
|
||||
return [
|
||||
{
|
||||
|
|
@ -35,7 +43,7 @@ export class VixSrc extends Extractor {
|
|||
ttl: this.ttl,
|
||||
meta: {
|
||||
countryCodes,
|
||||
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { headers: { Referer: url.href }, queueLimit: 4 }),
|
||||
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { headers }),
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#EXTM3U
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Italian",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="ita",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Daudio%26rendition%3Dita%26token%3Dgi4-3epkYBCfogktY8L9Tw%26expires%3D1756061649%26edge%3Dsc-u13-01"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Daudio%26rendition%3Deng%26token%3Dgi4-3epkYBCfogktY8L9Tw%26expires%3D1756061649%26edge%3Dsc-u13-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ita",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Dsubtitle%26rendition%3D3-ita%26token%3Dgi4-3epkYBCfogktY8L9Tw%26expires%3D1756061649%26edge%3Dsc-u13-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Dsubtitle%26rendition%3D4-eng%26token%3Dgi4-3epkYBCfogktY8L9Tw%26expires%3D1756061649%26edge%3Dsc-u13-01"
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=1200000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=854x480,AUDIO="audio",SUBTITLES="subs"
|
||||
https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Dvideo%26rendition%3D480p%26token%3D7v6ck17PxObPaqCCgb3UfQ%26expires%3D1756061649%26edge%3Dsc-u13-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=2150000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1280x720,AUDIO="audio",SUBTITLES="subs"
|
||||
https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Dvideo%26rendition%3D720p%26token%3Da9W71KeqCbV67VX1xceReQ%26expires%3D1756061649%26edge%3Dsc-u13-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,AUDIO="audio",SUBTITLES="subs"
|
||||
https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftype%3Dvideo%26rendition%3D1080p%26token%3DOOVfUQ_3veZMjPBb3FPkxg%26expires%3D1756061649%26edge%3Dsc-u13-01
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#EXTM3U
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Italian",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="ita",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Daudio%26rendition%3Dita%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Daudio%26rendition%3Deng%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English [CC]",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D3-eng%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="German",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ger",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D4-ger%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French [CC]",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="fre",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D5-fre%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="fre",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D6-fre%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian [Forced]",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="forced-ita",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D7-forced-ita%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ita",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D8-ita%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Japanese",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="jpn",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D9-jpn%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Ukrainian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ukr",URI="https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dsubtitle%26rendition%3D10-ukr%26token%3D9Xuf0k_DgmDiASPFeByoWg%26expires%3D1756061649%26edge%3Dsc-u2-01"
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=1200000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=854x480,AUDIO="audio",SUBTITLES="subs"
|
||||
https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dvideo%26rendition%3D480p%26token%3DgsQVLhHScXTJAxmwkTD2tQ%26expires%3D1756061649%26edge%3Dsc-u2-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=2150000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1280x720,AUDIO="audio",SUBTITLES="subs"
|
||||
https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dvideo%26rendition%3D720p%26token%3Dxqxvb6W5pFM0RE_zkKgMAA%26expires%3D1756061649%26edge%3Dsc-u2-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,AUDIO="audio",SUBTITLES="subs"
|
||||
https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftype%3Dvideo%26rendition%3D1080p%26token%3Dg7Q1oAxS7C07i_q_8_chaA%26expires%3D1756061649%26edge%3Dsc-u2-01
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"destination_url":"https://vixsrc.to/playlist/219736?token=689cf5587c2fec67fd83503a2a7dfd64&expires=1755949827&h=1","request_headers":{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","referer":"https://vixsrc.to/movie/600"},"mediaflow_proxy_url":"https://mediaflow-proxy.test/proxy/hls/manifest.m3u8","query_params":{"api_password":"asdfg"}}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"destination_url":"https://vixsrc.to/playlist/307316?token=2f5004a3b15f4ccdb3446f2b132a0957&expires=1755949828&h=1","request_headers":{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","referer":"https://vixsrc.to/tv/42009/4/2"},"mediaflow_proxy_url":"https://mediaflow-proxy.test/proxy/hls/manifest.m3u8","query_params":{"api_password":"asdfg"}}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"destination_url":"https://vixsrc.to/playlist/307316?token=2f5004a3b15f4ccdb3446f2b132a0957&expires=1755949828&h=1","request_headers":{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","referer":"https://vixsrc.to/tv/42009/4/2"},"mediaflow_proxy_url":"https://mediaflow-proxy.test/proxy/hls/manifest.m3u8","query_params":{"api_password":"asdfg"}}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
#EXTM3U
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Italian",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="ita",URI="https://vixsrc.to/playlist/219736?type=audio&rendition=ita&token=tbdHEV8A8QJNEdPYE0-lKA&expires=1764445261&edge=sc-u13-01"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://vixsrc.to/playlist/219736?type=audio&rendition=eng&token=tbdHEV8A8QJNEdPYE0-lKA&expires=1764445261&edge=sc-u13-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ita",URI="https://vixsrc.to/playlist/219736?type=subtitle&rendition=3-ita&token=tbdHEV8A8QJNEdPYE0-lKA&expires=1764445261&edge=sc-u13-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://vixsrc.to/playlist/219736?type=subtitle&rendition=4-eng&token=tbdHEV8A8QJNEdPYE0-lKA&expires=1764445261&edge=sc-u13-01"
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=1200000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=854x480,AUDIO="audio",SUBTITLES="subs"
|
||||
https://vixsrc.to/playlist/219736?type=video&rendition=480p&token=ACa9B8XzclDlkYj8tYUtTw&expires=1764445261&edge=sc-u13-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=2150000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1280x720,AUDIO="audio",SUBTITLES="subs"
|
||||
https://vixsrc.to/playlist/219736?type=video&rendition=720p&token=8sp5Gf7-4mKEt8spLHiggA&expires=1764445261&edge=sc-u13-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,AUDIO="audio",SUBTITLES="subs"
|
||||
https://vixsrc.to/playlist/219736?type=video&rendition=1080p&token=bw6kJGuT_zMLZlXPAZcb8w&expires=1764445261&edge=sc-u13-01
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#EXTM3U
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Italian",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="ita",URI="https://vixsrc.to/playlist/307316?type=audio&rendition=ita&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://vixsrc.to/playlist/307316?type=audio&rendition=eng&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English [CC]",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=3-eng&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="German",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ger",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=4-ger&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French [CC]",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="fre",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=5-fre&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="fre",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=6-fre&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian [Forced]",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="forced-ita",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=7-forced-ita&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ita",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=8-ita&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Japanese",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="jpn",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=9-jpn&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Ukrainian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ukr",URI="https://vixsrc.to/playlist/307316?type=subtitle&rendition=10-ukr&token=fELBLULcdUunb3YjA1RCOg&expires=1764445261&edge=sc-u2-01"
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=1200000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=854x480,AUDIO="audio",SUBTITLES="subs"
|
||||
https://vixsrc.to/playlist/307316?type=video&rendition=480p&token=uJLct-cE4Y8Wfi7bxCAluQ&expires=1764445261&edge=sc-u2-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=2150000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1280x720,AUDIO="audio",SUBTITLES="subs"
|
||||
https://vixsrc.to/playlist/307316?type=video&rendition=720p&token=bP0ZMdnA13QDCJfIo34xYQ&expires=1764445261&edge=sc-u2-01
|
||||
#EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,AUDIO="audio",SUBTITLES="subs"
|
||||
https://vixsrc.to/playlist/307316?type=video&rendition=1080p&token=Srrpdj__zYlDqBFfjfGZQw&expires=1764445261&edge=sc-u2-01
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@ exports[`VixSrc Black Mirror 1`] = `
|
|||
[
|
||||
{
|
||||
"format": "hls",
|
||||
"label": "VixSrc (via MediaFlow Proxy)",
|
||||
"label": "VixSrc",
|
||||
"meta": {
|
||||
"countryCodes": [
|
||||
"it",
|
||||
|
|
@ -13,19 +13,36 @@ exports[`VixSrc Black Mirror 1`] = `
|
|||
"height": 1080,
|
||||
},
|
||||
"sourceId": "vixsrc_",
|
||||
"ttl": 900000,
|
||||
"url": "https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Ftv%2F42009%2F4%2F2&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F307316%3Ftoken%3D2f5004a3b15f4ccdb3446f2b132a0957%26expires%3D1755949828%26h%3D1",
|
||||
"ttl": 21600000,
|
||||
"url": "https://vixsrc.to/playlist/307316.m3u8?token=5e3c2b315b1eee966c5261902e02d3b4&expires=1764445261&h=1",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`VixSrc Black Mirror is excluded if no matching language was found 1`] = `[]`;
|
||||
exports[`VixSrc Black Mirror is excluded if no matching language was found 1`] = `
|
||||
[
|
||||
{
|
||||
"format": "hls",
|
||||
"label": "VixSrc",
|
||||
"meta": {
|
||||
"countryCodes": [
|
||||
"it",
|
||||
"en",
|
||||
],
|
||||
"height": 1080,
|
||||
},
|
||||
"sourceId": "vixsrc_",
|
||||
"ttl": 21600000,
|
||||
"url": "https://vixsrc.to/playlist/307316.m3u8?token=5e3c2b315b1eee966c5261902e02d3b4&expires=1764445261&h=1",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`VixSrc Full Metal Jacket 1`] = `
|
||||
[
|
||||
{
|
||||
"format": "hls",
|
||||
"label": "VixSrc (via MediaFlow Proxy)",
|
||||
"label": "VixSrc",
|
||||
"meta": {
|
||||
"countryCodes": [
|
||||
"it",
|
||||
|
|
@ -34,8 +51,8 @@ exports[`VixSrc Full Metal Jacket 1`] = `
|
|||
"height": 1080,
|
||||
},
|
||||
"sourceId": "vixsrc_",
|
||||
"ttl": 900000,
|
||||
"url": "https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fvixsrc.to%2Fmovie%2F600&d=https%3A%2F%2Fvixsrc.to%2Fplaylist%2F219736%3Ftoken%3D689cf5587c2fec67fd83503a2a7dfd64%26expires%3D1755949827%26h%3D1",
|
||||
"ttl": 21600000,
|
||||
"url": "https://vixsrc.to/playlist/219736.m3u8?token=436a7a6bc6256b32eece595e2d7c5ed6&expires=1764445261&h=1",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ export const showExternalUrls = (config: Config): boolean => 'includeExternalUrl
|
|||
|
||||
export const noCache = (config: Config): boolean => 'noCache' in config;
|
||||
|
||||
export const hasMultiEnabled = (config: Config): boolean => 'multi' in config;
|
||||
|
||||
export const disableExtractorConfigKey = (extractor: Extractor): string => `disableExtractor_${extractor.id}`;
|
||||
|
||||
export const isExtractorDisabled = (config: Config, extractor: Extractor): boolean => disableExtractorConfigKey(extractor) in config;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const buildMediaFlowProxyExtractorRedirectUrl = (ctx: Context, host: stri
|
|||
return mediaFlowProxyUrl;
|
||||
};
|
||||
|
||||
export const buildMediaFlowProxyExtractorStreamUrl = async (ctx: Context, fetcher: Fetcher, host: string, url: URL, headers: Record<string, string> = {}): Promise<URL> => {
|
||||
export const buildMediaFlowProxyExtractorStreamUrl = async (ctx: Context, fetcher: Fetcher, host: string, url: URL, headers: Record<string, string>): Promise<URL> => {
|
||||
const mediaFlowProxyUrl = buildMediaFlowProxyExtractorUrl(ctx, host, url, headers);
|
||||
|
||||
const extractResult: ExtractResult = await fetcher.json(ctx, mediaFlowProxyUrl, { queueLimit: 4 });
|
||||
|
|
|
|||
Loading…
Reference in a new issue