make required changes

This commit is contained in:
TPN 2024-04-01 14:06:51 +00:00
parent c22608a4d6
commit 641821164c
2 changed files with 19 additions and 16 deletions

View File

@ -18,7 +18,10 @@ export const mixdropScraper = makeEmbed({
// this also handels the case where preview page urls are returned
// Example: https://mixdrop.vc/f/pkwrgp0pizgod0
// these don't have the packed code
const streamRes = await ctx.proxiedFetcher<string>(`https://mixdrop.si/e/${embedId}`);
const mixdropBase = 'https://mixdrop.ag';
const streamRes = await ctx.proxiedFetcher<string>(`/e/${embedId}`, {
baseUrl: mixdropBase,
});
const packed = streamRes.match(packedRegex);
// MixDrop uses a queue system for embeds
@ -51,7 +54,7 @@ export const mixdropScraper = makeEmbed({
url: url.startsWith('http') ? url : `https:${url}`, // URLs don't always start with the protocol
headers: {
// MixDrop requires this header on all streams
Referer: 'https://mixdrop.co/',
Referer: mixdropBase,
},
},
},

View File

@ -103,32 +103,32 @@ export const goMoviesScraper = makeSourcerer({
const embeds = [
{
embedId: upcloudScraper.id,
url: upcloudSource?.link ?? null,
url: upcloudSource?.link,
},
{
embedId: vidCloudScraper.id,
url: vidcloudSource?.link ?? null,
url: vidcloudSource?.link,
},
{
embedId: voeScraper.id,
url: voeSource?.link ?? null,
url: voeSource?.link,
},
{
embedId: doodScraper.id,
url: doodSource?.link ?? null,
url: doodSource?.link,
},
{
embedId: upstreamScraper.id,
url: upstreamSource?.link ?? null,
url: upstreamSource?.link,
},
{
embedId: mixdropScraper.id,
url: mixdropSource?.link ?? null,
url: mixdropSource?.link,
},
];
const filteredEmbeds = embeds
.filter((embed) => embed.url !== null)
.filter((embed) => embed.url)
.map((embed) => ({
embedId: embed.embedId,
url: embed.url as string,
@ -186,32 +186,32 @@ export const goMoviesScraper = makeSourcerer({
const embeds = [
{
embedId: upcloudScraper.id,
url: upcloudSource?.link ?? null,
url: upcloudSource?.link,
},
{
embedId: vidCloudScraper.id,
url: vidcloudSource?.link ?? null,
url: vidcloudSource?.link,
},
{
embedId: voeScraper.id,
url: voeSource?.link ?? null,
url: voeSource?.link,
},
{
embedId: doodScraper.id,
url: doodSource?.link ?? null,
url: doodSource?.link,
},
{
embedId: upstreamScraper.id,
url: upstreamSource?.link ?? null,
url: upstreamSource?.link,
},
{
embedId: mixdropScraper.id,
url: mixdropSource?.link ?? null,
url: mixdropSource?.link,
},
];
const filteredEmbeds = embeds
.filter((embed) => embed.url !== null)
.filter((embed) => embed.url)
.map((embed) => ({
embedId: embed.embedId,
url: embed.url as string,