Merge pull request #24 from movie-web/dev

Fix superstream
This commit is contained in:
William Oldham
2023-11-01 14:21:52 +00:00
committed by GitHub
3 changed files with 18 additions and 30 deletions

View File

@@ -1581,6 +1581,15 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
} }
}, },
"node_modules/@fastify/busboy": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
"integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
"dev": true,
"engines": {
"node": ">=14"
}
},
"node_modules/@hapi/hoek": { "node_modules/@hapi/hoek": {
"version": "9.3.0", "version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
@@ -5033,18 +5042,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
"dev": true,
"dependencies": {
"streamsearch": "^1.1.0"
},
"engines": {
"node": ">=10.16.0"
}
},
"node_modules/c12": { "node_modules/c12": {
"version": "1.4.2", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/c12/-/c12-1.4.2.tgz", "resolved": "https://registry.npmjs.org/c12/-/c12-1.4.2.tgz",
@@ -16384,15 +16381,6 @@
"integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==", "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==",
"dev": true "dev": true
}, },
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
"dev": true,
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/streamx": { "node_modules/streamx": {
"version": "2.15.1", "version": "2.15.1",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz",
@@ -18002,12 +17990,12 @@
} }
}, },
"node_modules/undici": { "node_modules/undici": {
"version": "5.24.0", "version": "5.27.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.24.0.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.0.tgz",
"integrity": "sha512-OKlckxBjFl0oXxcj9FU6oB8fDAaiRUq+D8jrFWGmOfI/gIyjk/IeS75LMzgYKUaeHzLUcYvf9bbJGSrUwTfwwQ==", "integrity": "sha512-l3ydWhlhOJzMVOYkymLykcRRXqbUaQriERtR70B9LzNkZ4bX52Fc8wbTDneMiwo8T+AemZXvXaTx+9o5ROxrXg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"busboy": "^1.6.0" "@fastify/busboy": "^2.0.0"
}, },
"engines": { "engines": {
"node": ">=14.0" "node": ">=14.0"

View File

@@ -1,6 +1,6 @@
{ {
"name": "@movie-web/providers", "name": "@movie-web/providers",
"version": "1.0.3", "version": "1.0.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",

View File

@@ -13,14 +13,14 @@ export const superStreamScraper = makeSourcerer({
flags: [flags.NO_CORS], flags: [flags.NO_CORS],
async scrapeShow(ctx) { async scrapeShow(ctx) {
const searchQuery = { const searchQuery = {
module: 'Search3', module: 'Search4',
page: '1', page: '1',
type: 'all', type: 'all',
keyword: ctx.media.title, keyword: ctx.media.title,
pagelimit: '20', pagelimit: '20',
}; };
const searchRes = (await sendRequest(ctx, searchQuery, true)).data; const searchRes = (await sendRequest(ctx, searchQuery, true)).data.list;
ctx.progress(33); ctx.progress(33);
const superstreamEntry = searchRes.find( const superstreamEntry = searchRes.find(
@@ -54,14 +54,14 @@ export const superStreamScraper = makeSourcerer({
}, },
async scrapeMovie(ctx) { async scrapeMovie(ctx) {
const searchQuery = { const searchQuery = {
module: 'Search3', module: 'Search4',
page: '1', page: '1',
type: 'all', type: 'all',
keyword: ctx.media.title, keyword: ctx.media.title,
pagelimit: '20', pagelimit: '20',
}; };
const searchRes = (await sendRequest(ctx, searchQuery, true)).data; const searchRes = (await sendRequest(ctx, searchQuery, true)).data.list;
ctx.progress(33); ctx.progress(33);
const superstreamEntry = searchRes.find( const superstreamEntry = searchRes.find(