mirror of
https://github.com/p-stream/providers.git
synced 2026-01-11 20:10:33 +00:00
fix catflix
This commit is contained in:
parent
5bed6217ca
commit
fb7632b30b
2 changed files with 26 additions and 4 deletions
|
|
@ -30,26 +30,48 @@ export const turbovidScraper = makeEmbed({
|
|||
if (!apkey || !xxid) throw new Error('Failed to get required values');
|
||||
|
||||
// json isn't parsed by proxiedFetcher due to content-type being text/html
|
||||
const juiceKey = JSON.parse(
|
||||
const encodedJuiceKey = JSON.parse(
|
||||
await ctx.proxiedFetcher('/api/cucked/juice_key', {
|
||||
baseUrl,
|
||||
headers: {
|
||||
referer: ctx.url,
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36',
|
||||
Accept: '*/*',
|
||||
'Accept-Language': 'en-US,en;q=0.9',
|
||||
Connection: 'keep-alive',
|
||||
'Content-Type': 'application/json',
|
||||
'X-Turbo': 'TurboVidClient',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
},
|
||||
}),
|
||||
).juice;
|
||||
|
||||
if (!juiceKey) throw new Error('Failed to fetch the key');
|
||||
if (!encodedJuiceKey) throw new Error('Failed to fetch the key');
|
||||
|
||||
const juiceKey = atob(encodedJuiceKey);
|
||||
|
||||
ctx.progress(60);
|
||||
|
||||
const data = JSON.parse(
|
||||
await ctx.proxiedFetcher('/api/cucked/the_juice/', {
|
||||
await ctx.proxiedFetcher('/api/cucked/the_juice_v2/', {
|
||||
baseUrl,
|
||||
query: {
|
||||
[apkey]: xxid,
|
||||
},
|
||||
headers: {
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36',
|
||||
Accept: '*/*',
|
||||
'Accept-Language': 'en-US,en;q=0.9',
|
||||
Connection: 'keep-alive',
|
||||
'Content-Type': 'application/json',
|
||||
'X-Turbo': 'TurboVidClient',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
referer: ctx.url,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export const catflixScraper = makeSourcerer({
|
|||
id: 'catflix',
|
||||
name: 'Catflix',
|
||||
rank: 160,
|
||||
disabled: true,
|
||||
disabled: false,
|
||||
flags: [],
|
||||
scrapeMovie: comboScraper,
|
||||
scrapeShow: comboScraper,
|
||||
|
|
|
|||
Loading…
Reference in a new issue