mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-02 16:23:48 +03:00
feat: adding support to qiwi
This commit is contained in:
parent
6c24a523b7
commit
c1bd1d30d7
15
src/main/services/hosters/qiwi.ts
Normal file
15
src/main/services/hosters/qiwi.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { requestWebPage } from "@main/helpers";
|
||||
|
||||
export class QiwiApi {
|
||||
public static async getDownloadUrl(url: string) {
|
||||
const document = await requestWebPage(url);
|
||||
const fileName = document.querySelector("h1")?.textContent;
|
||||
|
||||
const slug = url.split("/").pop();
|
||||
const extension = fileName?.split(".").pop();
|
||||
|
||||
const downloadUrl = `https://spyderrock.com/${slug}.${extension}`;
|
||||
|
||||
return downloadUrl;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user