diff --git a/.docs/content/1.get-started/0.introduction.md b/.docs/content/1.get-started/0.introduction.md index eb21056..6807b20 100644 --- a/.docs/content/1.get-started/0.introduction.md +++ b/.docs/content/1.get-started/0.introduction.md @@ -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? diff --git a/.docs/content/1.get-started/4.changelog.md b/.docs/content/1.get-started/4.changelog.md index 1e18e51..9464b1e 100644 --- a/.docs/content/1.get-started/4.changelog.md +++ b/.docs/content/1.get-started/4.changelog.md @@ -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. diff --git a/.docs/content/2.essentials/0.usage-on-x.md b/.docs/content/2.essentials/0.usage-on-x.md index 5294be4..0c7443d 100644 --- a/.docs/content/2.essentials/0.usage-on-x.md +++ b/.docs/content/2.essentials/0.usage-on-x.md @@ -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 }) ``` diff --git a/.docs/package-lock.json b/.docs/package-lock.json index 11e9e1a..89eaa52 100644 --- a/.docs/package-lock.json +++ b/.docs/package-lock.json @@ -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" diff --git a/.github/SECURITY.md b/.github/SECURITY.md index c8ee568..11b0a2a 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -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) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 77bcad9..5efefb7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/README.md b/README.md index a0cadad..ebc7991 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/package-lock.json b/package-lock.json index 033f07f..3b07825 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index 3ea5af9..df4367e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/providers/embeds/closeload.ts b/src/providers/embeds/closeload.ts index 0235a49..811323a 100644 --- a/src/providers/embeds/closeload.ts +++ b/src/providers/embeds/closeload.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"); diff --git a/src/providers/embeds/dood.ts b/src/providers/embeds/dood.ts index faa79d8..3dd5d05 100644 --- a/src/providers/embeds/dood.ts +++ b/src/providers/embeds/dood.ts @@ -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(`/pass_md5/${path}`, { + const doodPage = await ctx.proxiedFetcher(`/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/', }, }, }, diff --git a/src/providers/sources/goojara/getEmbeds.ts b/src/providers/sources/goojara/getEmbeds.ts index 50f574a..7b26d6c 100644 --- a/src/providers/sources/goojara/getEmbeds.ts +++ b/src/providers/sources/goojara/getEmbeds.ts @@ -10,18 +10,28 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise $(element).attr('href')) .get() @@ -33,10 +43,7 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise 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(`/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'); diff --git a/src/providers/sources/ridomovies/index.ts b/src/providers/sources/ridomovies/index.ts index f028875..fba442a 100644 --- a/src/providers/sources/ridomovies/index.ts +++ b/src/providers/sources/ridomovies/index.ts @@ -28,9 +28,9 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => const showPageResult = await ctx.proxiedFetcher(`/${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)];