mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding support to qiwi
This commit is contained in:
parent
6c24a523b7
commit
c1bd1d30d7
1 changed files with 15 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue