mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:33:26 +00:00
Final Fixes
This commit is contained in:
@@ -9,7 +9,7 @@ export const doodScraper = makeEmbed({
|
|||||||
name: 'dood',
|
name: 'dood',
|
||||||
rank: 173,
|
rank: 173,
|
||||||
async scrape(ctx) {
|
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];
|
const id = ctx.url.split('/d/')[1] || ctx.url.split('/e/')[1];
|
||||||
|
|
||||||
@@ -18,17 +18,17 @@ export const doodScraper = makeEmbed({
|
|||||||
baseUrl,
|
baseUrl,
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataForLater = doodData.match(/a\+"\?token=([^"]+)/)?.[1];
|
const dataForLater = doodData.match(/\?token=([^&]+)&expiry=/)?.[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}&expiry=${Date.now()}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
stream: [
|
stream: [
|
||||||
@@ -42,7 +42,7 @@ export const doodScraper = makeEmbed({
|
|||||||
type: 'mp4',
|
type: 'mp4',
|
||||||
url: downloadURL,
|
url: downloadURL,
|
||||||
headers: {
|
headers: {
|
||||||
referer: 'https://do0od.com/',
|
Referer: 'https://d0000d.com/',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -17,13 +17,7 @@ export const wootlyScraper = makeEmbed({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const cookies = parseSetCookie(wootlyData.headers.get('Set-Cookie') || '');
|
const cookies = parseSetCookie(wootlyData.headers.get('Set-Cookie') || '');
|
||||||
let wootssesCookie = '';
|
const wootssesCookie = cookies.wootsses.value;
|
||||||
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') ?? '';
|
||||||
@@ -32,24 +26,18 @@ export const wootlyScraper = makeEmbed({
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
readHeaders: ['Set-Cookie'],
|
readHeaders: ['Set-Cookie'],
|
||||||
headers: {
|
headers: {
|
||||||
cookie,
|
cookie: makeCookieHeader({ wootsses: wootssesCookie }),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const woozCookies = parseSetCookie(woozCookieRequest.headers.get('Set-Cookie') || '');
|
const woozCookies = parseSetCookie(woozCookieRequest.headers.get('Set-Cookie') || '');
|
||||||
let woozCookie = '';
|
const woozCookie = woozCookies.wooz.value;
|
||||||
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,
|
cookie: makeCookieHeader({ wooz: woozCookie }),
|
||||||
Referer: iframeSrc,
|
Referer: iframeSrc,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -63,18 +51,13 @@ 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,
|
cookie: makeCookieHeader({ wooz: woozCookie, wootsses: wootssesCookie }),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user