Skip to content

Commit

Permalink
Fix warezplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
ztpn committed Dec 8, 2024
1 parent 4d50551 commit 06fd078
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/providers/embeds/warezcdn/warezplayer.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
import { makeEmbed } from '@/providers/base';
import { warezcdnApiBase, warezcdnPlayerBase } from '@/providers/sources/warezcdn/common';

export const warezPlayerScraper = makeEmbed({
id: 'warezplayer',
name: 'warezPLAYER',
rank: 85,
async scrape(ctx) {
const page = await ctx.proxiedFetcher.full<string>(`/player.php`, {
baseUrl: warezcdnPlayerBase,
headers: {
Referer: `${warezcdnApiBase}/getEmbed.php?${new URLSearchParams({
id: ctx.url,
sv: 'warezcdn',
})}`,
},
query: {
id: ctx.url,
},
});
// ex url: https://basseqwevewcewcewecwcw.xyz/video/0e4a2c65bdaddd66a53422d93daebe68
const playerPageUrl = new URL(page.finalUrl);
const playerPageUrl = new URL(ctx.url);

const hash = playerPageUrl.pathname.split('/')[2];
const playerApiRes = await ctx.proxiedFetcher('/player/index.php', {
Expand Down

0 comments on commit 06fd078

Please sign in to comment.