mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:33:25 +00:00
Merge branch 'dev' into fix-upcloud-captions
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## What is `@movie-web/providers`?
|
||||
|
||||
`@movie-web/providers` is the soul of [movie-web.app](https://movie-web.app). It's a collection of scrapers of various streaming sites. It extracts the raw streams from those sites, so you can watch them without any extra fluff from the original sites.
|
||||
`@movie-web/providers` is the soul of [movie-web](https://github.com/movie-web/movie-web). It's a collection of scrapers of various streaming sites. It extracts the raw streams from those sites, so you can watch them without any extra fluff from the original sites.
|
||||
|
||||
## What can I use this on?
|
||||
|
||||
|
@@ -2,6 +2,9 @@
|
||||
title: 'Changelog'
|
||||
---
|
||||
|
||||
# Version 2.2.1
|
||||
- Fixed Closeload scraper
|
||||
|
||||
# Version 2.2.0
|
||||
- Fixed vidsrc.me URL decoding.
|
||||
- Added ridomovies with Ridoo and Closeload embed.
|
||||
|
@@ -17,7 +17,7 @@ import { makeProviders, makeStandardFetcher, targets } from '@movie-web/provider
|
||||
|
||||
const providers = makeProviders({
|
||||
fetcher: makeStandardFetcher(fetch),
|
||||
target: chooseYourself, // check out https://providers.docs.movie-web.app/essentials/targets
|
||||
target: chooseYourself, // check out https://movie-web.github.io/providers/essentials/targets
|
||||
})
|
||||
```
|
||||
|
||||
|
12
.docs/package-lock.json
generated
12
.docs/package-lock.json
generated
@@ -7627,9 +7627,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ip": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
|
||||
"integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz",
|
||||
"integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/iron-webcrypto": {
|
||||
@@ -16642,9 +16642,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.27.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz",
|
||||
"integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==",
|
||||
"version": "5.28.3",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz",
|
||||
"integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
|
2
.github/SECURITY.md
vendored
2
.github/SECURITY.md
vendored
@@ -11,4 +11,4 @@ Support is not provided for any forks or mirrors of movie-web.
|
||||
|
||||
There are two ways you can contact the movie-web maintainers to report a vulnerability:
|
||||
- Email [security@movie-web.app](mailto:security@movie-web.app)
|
||||
- Report the vulnerability in the [movie-web Discord server](https://discord.movie-web.app)
|
||||
- Report the vulnerability in the [movie-web Discord server](https://discord.gg/gQYB6fGArX)
|
||||
|
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -26,6 +26,8 @@ jobs:
|
||||
- name: Build project
|
||||
working-directory: ./.docs
|
||||
run: npm run generate
|
||||
env:
|
||||
NUXT_APP_BASE_URL: /providers/
|
||||
|
||||
- name: Upload production-ready build files
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
|
@@ -7,8 +7,8 @@ features:
|
||||
- scrape popular streaming websites
|
||||
- works in both browser and server-side
|
||||
|
||||
Visit documentation here: https://providers.docs.movie-web.app/
|
||||
Visit documentation here: https://movie-web.github.io/providers/
|
||||
|
||||
## How to run locally or test my changes
|
||||
|
||||
These topics are also covered in the documentation, [read about it here](https://providers.docs.movie-web.app/extra-topics/development).
|
||||
These topics are also covered in the documentation, [read about it here](https://movie-web.github.io/providers/extra-topics/development).
|
||||
|
16
package-lock.json
generated
16
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@movie-web/providers",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@movie-web/providers",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cheerio": "^1.0.0-rc.12",
|
||||
@@ -3357,9 +3357,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ip": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
|
||||
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==",
|
||||
"version": "1.1.9",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz",
|
||||
"integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/is-array-buffer": {
|
||||
@@ -4937,9 +4937,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/socks/node_modules/ip": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
|
||||
"integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz",
|
||||
"integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@movie-web/providers",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"description": "Package that contains all the providers of movie-web",
|
||||
"main": "./lib/index.umd.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
@@ -32,7 +32,7 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/movie-web/providers/issues"
|
||||
},
|
||||
"homepage": "https://providers.docs.movie-web.app/",
|
||||
"homepage": "https://movie-web.github.io/providers/",
|
||||
"scripts": {
|
||||
"build": "vite build && tsc --noEmit",
|
||||
"cli": "ts-node ./src/dev-cli/index.ts",
|
||||
|
@@ -43,7 +43,7 @@ export const closeLoadScraper = makeEmbed({
|
||||
const evalCode = iframeRes$('script')
|
||||
.filter((_, el) => {
|
||||
const script = iframeRes$(el);
|
||||
return (script.attr('type') === 'text/javascript' && script.html()?.includes('eval')) ?? false;
|
||||
return (script.attr('type') === 'text/javascript' && script.html()?.includes('p,a,c,k,e,d')) ?? false;
|
||||
})
|
||||
.html();
|
||||
if (!evalCode) throw new Error("Couldn't find eval code");
|
||||
|
@@ -9,7 +9,7 @@ export const doodScraper = makeEmbed({
|
||||
name: 'dood',
|
||||
rank: 173,
|
||||
async scrape(ctx) {
|
||||
const baseUrl = 'https://do0od.com';
|
||||
const baseUrl = 'https://d0000d.com';
|
||||
|
||||
const id = ctx.url.split('/d/')[1] || ctx.url.split('/e/')[1];
|
||||
|
||||
@@ -18,18 +18,17 @@ export const doodScraper = makeEmbed({
|
||||
baseUrl,
|
||||
});
|
||||
|
||||
const dataForLater = doodData.match(/a\+"\?token=([^"]+)/)?.[1];
|
||||
const dataForLater = doodData.match(/\?token=([^&]+)&expiry=/)?.[1];
|
||||
const path = doodData.match(/\$\.get\('\/pass_md5([^']+)/)?.[1];
|
||||
|
||||
const doodPage = await ctx.proxiedFetcher<string>(`/pass_md5/${path}`, {
|
||||
const doodPage = await ctx.proxiedFetcher<string>(`/pass_md5${path}`, {
|
||||
headers: {
|
||||
referer: `${baseUrl}/e/${id}`,
|
||||
Referer: `${baseUrl}/e/${id}`,
|
||||
},
|
||||
method: 'GET',
|
||||
baseUrl,
|
||||
});
|
||||
|
||||
const downloadURL = `${doodPage}${nanoid()}?token=${dataForLater}${Date.now()}`;
|
||||
const downloadURL = `${doodPage}${nanoid()}?token=${dataForLater}&expiry=${Date.now()}`;
|
||||
|
||||
return {
|
||||
stream: [
|
||||
@@ -43,7 +42,7 @@ export const doodScraper = makeEmbed({
|
||||
type: 'mp4',
|
||||
url: downloadURL,
|
||||
headers: {
|
||||
referer: 'https://do0od.com/',
|
||||
Referer: 'https://d0000d.com/',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@@ -10,18 +10,28 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise<EmbedsR
|
||||
baseUrl: baseUrl2,
|
||||
headers: {
|
||||
Referer: baseUrl,
|
||||
cookie: '',
|
||||
},
|
||||
readHeaders: ['Set-Cookie'],
|
||||
method: 'GET',
|
||||
});
|
||||
|
||||
const cookies = parseSetCookie(data.headers.get('Set-Cookie') || '');
|
||||
const aGoozCookie = cookies.aGooz.value;
|
||||
|
||||
const $ = load(data.body);
|
||||
const RandomCookieName = data.body.split(`_3chk('`)[1].split(`'`)[0];
|
||||
const RandomCookieValue = data.body.split(`_3chk('`)[1].split(`'`)[2];
|
||||
|
||||
let aGoozCookie = '';
|
||||
let cookie = '';
|
||||
if (cookies && cookies.aGooz && RandomCookieName && RandomCookieValue) {
|
||||
aGoozCookie = cookies.aGooz.value;
|
||||
cookie = makeCookieHeader({
|
||||
aGooz: aGoozCookie,
|
||||
[RandomCookieName]: RandomCookieValue,
|
||||
});
|
||||
}
|
||||
|
||||
const $ = load(data.body);
|
||||
|
||||
const embedRedirectURLs = $('a')
|
||||
.map((index, element) => $(element).attr('href'))
|
||||
.get()
|
||||
@@ -33,10 +43,7 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise<EmbedsR
|
||||
ctx.fetcher
|
||||
.full(url, {
|
||||
headers: {
|
||||
cookie: makeCookieHeader({
|
||||
aGooz: aGoozCookie,
|
||||
[RandomCookieName]: RandomCookieValue,
|
||||
}),
|
||||
cookie,
|
||||
Referer: baseUrl2,
|
||||
},
|
||||
method: 'GET',
|
||||
|
@@ -21,7 +21,7 @@ async function universalScraper(ctx: ShowScrapeContext | MovieScrapeContext): Pr
|
||||
|
||||
export const goojaraScraper = makeSourcerer({
|
||||
id: 'goojara',
|
||||
name: 'goojara',
|
||||
name: 'Goojara',
|
||||
rank: 225,
|
||||
flags: [],
|
||||
scrapeShow: universalScraper,
|
||||
|
@@ -49,7 +49,6 @@ export async function searchAndFindMedia(
|
||||
});
|
||||
|
||||
const result = results.find((res: Result) => compareMedia(media, res.title, Number(res.year)));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -67,19 +66,7 @@ export async function scrapeIds(
|
||||
baseUrl,
|
||||
headers: headersData,
|
||||
method: 'GET',
|
||||
});
|
||||
|
||||
const $1 = load(data);
|
||||
|
||||
const dataId = $1('#seon').attr('data-id');
|
||||
|
||||
if (!dataId) throw new NotFoundError('Not found');
|
||||
|
||||
data = await ctx.fetcher<string>(`/xhrc.php`, {
|
||||
baseUrl,
|
||||
headers: headersData,
|
||||
method: 'POST',
|
||||
body: new URLSearchParams({ s: media.season.number.toString(), t: dataId }),
|
||||
query: { s: media.season.number.toString() },
|
||||
});
|
||||
|
||||
let episodeId = '';
|
||||
@@ -89,7 +76,6 @@ export async function scrapeIds(
|
||||
$2('.seho').each((index, element) => {
|
||||
// Extracting the episode number as a string
|
||||
const episodeNumber = $2(element).find('.seep .sea').text().trim();
|
||||
|
||||
// Comparing with the desired episode number as a string
|
||||
if (parseInt(episodeNumber, 10) === media.episode.number) {
|
||||
const href = $2(element).find('.snfo h1 a').attr('href');
|
||||
|
@@ -28,9 +28,9 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
||||
const showPageResult = await ctx.proxiedFetcher<string>(`/${show.fullSlug}`, {
|
||||
baseUrl: ridoMoviesBase,
|
||||
});
|
||||
const fullEpisodeSlug = `${show.fullSlug}/season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`;
|
||||
const fullEpisodeSlug = `season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`;
|
||||
const regexPattern = new RegExp(
|
||||
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"${fullEpisodeSlug}\\\\\\")`,
|
||||
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"[^"]*${fullEpisodeSlug}[^"]*\\\\\\")`,
|
||||
'g',
|
||||
);
|
||||
const matches = [...showPageResult.matchAll(regexPattern)];
|
||||
|
Reference in New Issue
Block a user