mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:03:25 +00:00
Fix Wootly, Fix Goojara, Fix Id.
This commit is contained in:
@@ -21,14 +21,13 @@ export const doodScraper = makeEmbed({
|
|||||||
const dataForLater = doodData.match(/a\+"\?token=([^"]+)/)?.[1];
|
const dataForLater = doodData.match(/a\+"\?token=([^"]+)/)?.[1];
|
||||||
const path = doodData.match(/\$\.get\('\/pass_md5([^']+)/)?.[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: {
|
headers: {
|
||||||
referer: `${baseUrl}/e/${id}`,
|
referer: `${baseUrl}/e/${id}`,
|
||||||
},
|
},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
baseUrl,
|
baseUrl,
|
||||||
});
|
});
|
||||||
|
|
||||||
const downloadURL = `${doodPage}${nanoid()}?token=${dataForLater}${Date.now()}`;
|
const downloadURL = `${doodPage}${nanoid()}?token=${dataForLater}${Date.now()}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@@ -17,7 +17,13 @@ export const wootlyScraper = makeEmbed({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const cookies = parseSetCookie(wootlyData.headers.get('Set-Cookie') || '');
|
const cookies = parseSetCookie(wootlyData.headers.get('Set-Cookie') || '');
|
||||||
const wootssesCookie = cookies.wootsses.value;
|
let wootssesCookie = '';
|
||||||
|
let cookie = '';
|
||||||
|
|
||||||
|
if (cookies && cookies.wootsses) {
|
||||||
|
wootssesCookie = cookies.wootsses.value;
|
||||||
|
cookie = makeCookieHeader({ wootsses: wootssesCookie });
|
||||||
|
}
|
||||||
|
|
||||||
let $ = load(wootlyData.body); // load the html data
|
let $ = load(wootlyData.body); // load the html data
|
||||||
const iframeSrc = $('iframe').attr('src') ?? '';
|
const iframeSrc = $('iframe').attr('src') ?? '';
|
||||||
@@ -26,18 +32,24 @@ export const wootlyScraper = makeEmbed({
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
readHeaders: ['Set-Cookie'],
|
readHeaders: ['Set-Cookie'],
|
||||||
headers: {
|
headers: {
|
||||||
cookie: makeCookieHeader({ wootsses: wootssesCookie }),
|
cookie,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const woozCookies = parseSetCookie(woozCookieRequest.headers.get('Set-Cookie') || '');
|
const woozCookies = parseSetCookie(woozCookieRequest.headers.get('Set-Cookie') || '');
|
||||||
const woozCookie = woozCookies.wooz.value;
|
let woozCookie = '';
|
||||||
|
cookie = '';
|
||||||
|
|
||||||
|
if (cookies && woozCookies.wooz) {
|
||||||
|
woozCookie = woozCookies.wooz.value;
|
||||||
|
cookie = makeCookieHeader({ wooz: woozCookie });
|
||||||
|
}
|
||||||
|
|
||||||
const iframeData = await ctx.proxiedFetcher<string>(iframeSrc, {
|
const iframeData = await ctx.proxiedFetcher<string>(iframeSrc, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: new URLSearchParams({ qdf: '1' }),
|
body: new URLSearchParams({ qdf: '1' }),
|
||||||
headers: {
|
headers: {
|
||||||
cookie: makeCookieHeader({ wooz: woozCookie }),
|
cookie,
|
||||||
Referer: iframeSrc,
|
Referer: iframeSrc,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -51,13 +63,18 @@ export const wootlyScraper = makeEmbed({
|
|||||||
const vd = scriptText.match(/vd=([^,]+)/)?.[0].replace(/vd=|["\s]/g, '');
|
const vd = scriptText.match(/vd=([^,]+)/)?.[0].replace(/vd=|["\s]/g, '');
|
||||||
|
|
||||||
if (!tk || !vd) throw new Error('wootly source not found');
|
if (!tk || !vd) throw new Error('wootly source not found');
|
||||||
|
cookie = '';
|
||||||
|
|
||||||
|
if (woozCookie && wootssesCookie !== '') {
|
||||||
|
cookie = makeCookieHeader({ wooz: woozCookie, wootsses: wootssesCookie });
|
||||||
|
}
|
||||||
|
|
||||||
const url = await ctx.proxiedFetcher<string>(`/grabd`, {
|
const url = await ctx.proxiedFetcher<string>(`/grabd`, {
|
||||||
baseUrl,
|
baseUrl,
|
||||||
query: { t: tk, id: vd },
|
query: { t: tk, id: vd },
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
cookie: makeCookieHeader({ wooz: woozCookie, wootsses: wootssesCookie }),
|
cookie,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -10,18 +10,28 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise<EmbedsR
|
|||||||
baseUrl: baseUrl2,
|
baseUrl: baseUrl2,
|
||||||
headers: {
|
headers: {
|
||||||
Referer: baseUrl,
|
Referer: baseUrl,
|
||||||
|
cookie: '',
|
||||||
},
|
},
|
||||||
readHeaders: ['Set-Cookie'],
|
readHeaders: ['Set-Cookie'],
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
});
|
});
|
||||||
|
|
||||||
const cookies = parseSetCookie(data.headers.get('Set-Cookie') || '');
|
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 RandomCookieName = data.body.split(`_3chk('`)[1].split(`'`)[0];
|
||||||
const RandomCookieValue = data.body.split(`_3chk('`)[1].split(`'`)[2];
|
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')
|
const embedRedirectURLs = $('a')
|
||||||
.map((index, element) => $(element).attr('href'))
|
.map((index, element) => $(element).attr('href'))
|
||||||
.get()
|
.get()
|
||||||
@@ -33,10 +43,7 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise<EmbedsR
|
|||||||
ctx.fetcher
|
ctx.fetcher
|
||||||
.full(url, {
|
.full(url, {
|
||||||
headers: {
|
headers: {
|
||||||
cookie: makeCookieHeader({
|
cookie,
|
||||||
aGooz: aGoozCookie,
|
|
||||||
[RandomCookieName]: RandomCookieValue,
|
|
||||||
}),
|
|
||||||
Referer: baseUrl2,
|
Referer: baseUrl2,
|
||||||
},
|
},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@@ -20,7 +20,7 @@ async function universalScraper(ctx: ShowScrapeContext | MovieScrapeContext): Pr
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const goojaraScraper = makeSourcerer({
|
export const goojaraScraper = makeSourcerer({
|
||||||
id: 'Goojara',
|
id: 'goojara',
|
||||||
name: 'Goojara',
|
name: 'Goojara',
|
||||||
rank: 225,
|
rank: 225,
|
||||||
flags: [],
|
flags: [],
|
||||||
|
@@ -73,10 +73,9 @@ export async function scrapeIds(
|
|||||||
|
|
||||||
const $2 = load(data);
|
const $2 = load(data);
|
||||||
|
|
||||||
$2('.seho').each((_index: any, element: any) => {
|
$2('.seho').each((index, element) => {
|
||||||
// Extracting the episode number as a string
|
// Extracting the episode number as a string
|
||||||
const episodeNumber = $2(element).find('.seep .sea').text().trim();
|
const episodeNumber = $2(element).find('.seep .sea').text().trim();
|
||||||
console.log(episodeNumber);
|
|
||||||
// Comparing with the desired episode number as a string
|
// Comparing with the desired episode number as a string
|
||||||
if (parseInt(episodeNumber, 10) === media.episode.number) {
|
if (parseInt(episodeNumber, 10) === media.episode.number) {
|
||||||
const href = $2(element).find('.snfo h1 a').attr('href');
|
const href = $2(element).find('.snfo h1 a').attr('href');
|
||||||
|
Reference in New Issue
Block a user