This commit is contained in:
2024-03-27 23:43:23 -05:00
parent 22766ca82a
commit c8f32145fc
2 changed files with 10 additions and 2 deletions

View File

@@ -3,15 +3,20 @@ import { customAlphabet } from 'nanoid';
import { makeEmbed } from '@/providers/base';
const nanoid = customAlphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 10);
const baseUrl = 'https://d000d.com';
export const doodScraper = makeEmbed({
id: 'dood',
name: 'dood',
rank: 173,
async scrape(ctx) {
const baseUrl = 'https://d0000d.com';
let url = ctx.url;
if (ctx.url.includes('primewire')) {
const request = await ctx.proxiedFetcher.full(ctx.url);
url = request.finalUrl;
}
const id = ctx.url.split('/d/')[1] || ctx.url.split('/e/')[1];
const id = url.split('/d/')[1] || url.split('/e/')[1];
const doodData = await ctx.proxiedFetcher<string>(`/e/${id}`, {
method: 'GET',

View File

@@ -51,6 +51,9 @@ async function getStreams(title: string) {
case 'streamvid.net':
embedId = 'streamvid';
break;
case 'dood.watch':
embedId = 'dood';
break;
default:
embedId = null;
}