Skip to content

Commit

Permalink
feat: adding support to qiwi
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrannychaseroperation committed Aug 18, 2024
1 parent 6c24a52 commit c1bd1d3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/services/hosters/qiwi.ts
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit c1bd1d3

Please sign in to comment.