fix catflix

This commit is contained in:
Pas 2025-06-09 10:36:42 -06:00
parent 5bed6217ca
commit fb7632b30b
2 changed files with 26 additions and 4 deletions

View file

@ -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,
},
}),

View file

@ -54,7 +54,7 @@ export const catflixScraper = makeSourcerer({
id: 'catflix',
name: 'Catflix',
rank: 160,
disabled: true,
disabled: false,
flags: [],
scrapeMovie: comboScraper,
scrapeShow: comboScraper,