mirror of
https://github.com/sussy-code/providers.git
synced 2026-04-21 08:31:57 +00:00
fix mixdrop
This commit is contained in:
parent
641821164c
commit
45a3f2835d
1 changed files with 3 additions and 2 deletions
|
|
@ -12,8 +12,9 @@ export const mixdropScraper = makeEmbed({
|
||||||
async scrape(ctx) {
|
async scrape(ctx) {
|
||||||
// Example url: https://mixdrop.co/e/pkwrgp0pizgod0
|
// Example url: https://mixdrop.co/e/pkwrgp0pizgod0
|
||||||
// Example url: https://mixdrop.vc/e/pkwrgp0pizgod0
|
// Example url: https://mixdrop.vc/e/pkwrgp0pizgod0
|
||||||
const finalEmbedUrl = (await ctx.fetcher.full(ctx.url)).finalUrl;
|
let embedUrl = ctx.url;
|
||||||
const embedId = new URL(finalEmbedUrl).pathname.split('/')[2];
|
if (ctx.url.includes('primewire')) embedUrl = (await ctx.fetcher.full(ctx.url)).finalUrl;
|
||||||
|
const embedId = new URL(embedUrl).pathname.split('/')[2];
|
||||||
// constructing the url because many times mixdrop.co is returned which does not work
|
// constructing the url because many times mixdrop.co is returned which does not work
|
||||||
// this also handels the case where preview page urls are returned
|
// this also handels the case where preview page urls are returned
|
||||||
// Example: https://mixdrop.vc/f/pkwrgp0pizgod0
|
// Example: https://mixdrop.vc/f/pkwrgp0pizgod0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue