Merge branch 'movie-web:dev' into primewire
This commit is contained in:
commit
ca70828efd
|
@ -23,7 +23,7 @@ module.exports = {
|
||||||
'no-bitwise': 'off',
|
'no-bitwise': 'off',
|
||||||
'no-underscore-dangle': 'off',
|
'no-underscore-dangle': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'no-console': 'off',
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
||||||
'@typescript-eslint/no-this-alias': 'off',
|
'@typescript-eslint/no-this-alias': 'off',
|
||||||
'import/prefer-default-export': 'off',
|
'import/prefer-default-export': 'off',
|
||||||
'@typescript-eslint/no-empty-function': 'off',
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@movie-web/providers",
|
"name": "@movie-web/providers",
|
||||||
"version": "2.2.3",
|
"version": "2.2.4",
|
||||||
"description": "Package that contains all the providers of movie-web",
|
"description": "Package that contains all the providers of movie-web",
|
||||||
"main": "./lib/index.umd.js",
|
"main": "./lib/index.umd.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { inspect } from 'node:util';
|
import { inspect } from 'node:util';
|
||||||
|
|
||||||
export function logDeepObject(object: Record<any, any>) {
|
export function logDeepObject(object: Record<any, any>) {
|
||||||
|
// This is the dev cli, so we can use console.log
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(inspect(object, { showHidden: false, depth: null, colors: true }));
|
console.log(inspect(object, { showHidden: false, depth: null, colors: true }));
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@ async function runBrowserScraping(
|
||||||
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
});
|
});
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
|
// This is the dev cli, so we can use console.log
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
page.on('console', (message) => console.log(`${message.type().slice(0, 3).toUpperCase()} ${message.text()}`));
|
page.on('console', (message) => console.log(`${message.type().slice(0, 3).toUpperCase()} ${message.text()}`));
|
||||||
await page.goto(server.resolvedUrls.local[0]);
|
await page.goto(server.resolvedUrls.local[0]);
|
||||||
await page.waitForFunction('!!window.scrape', { timeout: 5000 });
|
await page.waitForFunction('!!window.scrape', { timeout: 5000 });
|
||||||
|
|
|
@ -52,7 +52,6 @@ function parseVideoLinks(inputString?: string): FileBasedStream['qualities'] {
|
||||||
const numericQualityMatch = qualityText.match(/(\d+p)/);
|
const numericQualityMatch = qualityText.match(/(\d+p)/);
|
||||||
const quality = numericQualityMatch ? numericQualityMatch[1] : 'Unknown';
|
const quality = numericQualityMatch ? numericQualityMatch[1] : 'Unknown';
|
||||||
|
|
||||||
console.log(quality, mp4Url);
|
|
||||||
const validQuality = getValidQualityFromString(quality);
|
const validQuality = getValidQualityFromString(quality);
|
||||||
result[validQuality] = { type: 'mp4', url: mp4Url };
|
result[validQuality] = { type: 'mp4', url: mp4Url };
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ const referer = 'https://remotestre.am/';
|
||||||
export const remotestreamScraper = makeSourcerer({
|
export const remotestreamScraper = makeSourcerer({
|
||||||
id: 'remotestream',
|
id: 'remotestream',
|
||||||
name: 'Remote Stream',
|
name: 'Remote Stream',
|
||||||
|
disabled: true,
|
||||||
rank: 55,
|
rank: 55,
|
||||||
flags: [flags.CORS_ALLOWED],
|
flags: [flags.CORS_ALLOWED],
|
||||||
async scrapeShow(ctx) {
|
async scrapeShow(ctx) {
|
||||||
|
|
|
@ -11,11 +11,11 @@ const vidSrcToBase = 'https://vidsrc.to';
|
||||||
const referer = `${vidSrcToBase}/`;
|
const referer = `${vidSrcToBase}/`;
|
||||||
|
|
||||||
const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> => {
|
const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> => {
|
||||||
const imdbId = ctx.media.imdbId;
|
const mediaId = ctx.media.imdbId ?? ctx.media.tmdbId;
|
||||||
const url =
|
const url =
|
||||||
ctx.media.type === 'movie'
|
ctx.media.type === 'movie'
|
||||||
? `/embed/movie/${imdbId}`
|
? `/embed/movie/${mediaId}`
|
||||||
: `/embed/tv/${imdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
: `/embed/tv/${mediaId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
||||||
const mainPage = await ctx.proxiedFetcher<string>(url, {
|
const mainPage = await ctx.proxiedFetcher<string>(url, {
|
||||||
baseUrl: vidSrcToBase,
|
baseUrl: vidSrcToBase,
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in New Issue