mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 14:33:26 +00:00
Merge branch 'movie-web:dev' into primewire
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { inspect } from 'node:util';
|
||||
|
||||
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 }));
|
||||
}
|
||||
|
@@ -41,6 +41,8 @@ async function runBrowserScraping(
|
||||
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||
});
|
||||
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()}`));
|
||||
await page.goto(server.resolvedUrls.local[0]);
|
||||
await page.waitForFunction('!!window.scrape', { timeout: 5000 });
|
||||
|
@@ -52,7 +52,6 @@ function parseVideoLinks(inputString?: string): FileBasedStream['qualities'] {
|
||||
const numericQualityMatch = qualityText.match(/(\d+p)/);
|
||||
const quality = numericQualityMatch ? numericQualityMatch[1] : 'Unknown';
|
||||
|
||||
console.log(quality, mp4Url);
|
||||
const validQuality = getValidQualityFromString(quality);
|
||||
result[validQuality] = { type: 'mp4', url: mp4Url };
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ const referer = 'https://remotestre.am/';
|
||||
export const remotestreamScraper = makeSourcerer({
|
||||
id: 'remotestream',
|
||||
name: 'Remote Stream',
|
||||
disabled: true,
|
||||
rank: 55,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
async scrapeShow(ctx) {
|
||||
|
@@ -11,11 +11,11 @@ const vidSrcToBase = 'https://vidsrc.to';
|
||||
const referer = `${vidSrcToBase}/`;
|
||||
|
||||
const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> => {
|
||||
const imdbId = ctx.media.imdbId;
|
||||
const mediaId = ctx.media.imdbId ?? ctx.media.tmdbId;
|
||||
const url =
|
||||
ctx.media.type === 'movie'
|
||||
? `/embed/movie/${imdbId}`
|
||||
: `/embed/tv/${imdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
||||
? `/embed/movie/${mediaId}`
|
||||
: `/embed/tv/${mediaId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
||||
const mainPage = await ctx.proxiedFetcher<string>(url, {
|
||||
baseUrl: vidSrcToBase,
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user