mirror of
https://github.com/sussy-code/providers.git
synced 2026-03-11 17:55:37 +00:00
Fix dood
This commit is contained in:
parent
22766ca82a
commit
c8f32145fc
2 changed files with 10 additions and 2 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ async function getStreams(title: string) {
|
|||
case 'streamvid.net':
|
||||
embedId = 'streamvid';
|
||||
break;
|
||||
case 'dood.watch':
|
||||
embedId = 'dood';
|
||||
break;
|
||||
default:
|
||||
embedId = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue