Skip to content

Commit

Permalink
uploadflix fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mnsrulz committed Sep 1, 2024
1 parent 54d7d20 commit 2a96612
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/libs/uploadFlix.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
import { GenericFormBasedResolver } from "../BaseResolver.js";
import { BaseUrlResolver, ResolvedMediaItem } from "../BaseResolver.js";

export class UploadFlixResolver extends GenericFormBasedResolver {
export class UploadFlixResolver extends BaseUrlResolver {
constructor() {
super({
domains: [/https?:\/\/(dl\.)?uploadflix/],
speedRank: 75
}, 'a.downloadbtn');
speedRank: 85
});
}

async resolveInner(_urlToResolve: string): Promise<ResolvedMediaItem[] | ResolvedMediaItem> {
const resp = await this.gotInstance(_urlToResolve);
const link = this.scrapeLinkHref(resp.body, '.download a');
if(link){
const title = this.extractFileNameFromUrl(link)
return {
link,
title,
isPlayable: true
} as ResolvedMediaItem;
}
return [];
}
}

0 comments on commit 2a96612

Please sign in to comment.