feat: adding support to qiwi

This commit is contained in:
Chubby Granny Chaser 2024-08-18 16:19:06 +01:00
parent 76d3fead66
commit 6c24a523b7
No known key found for this signature in database
8 changed files with 46 additions and 26 deletions

View file

@ -1,4 +1,5 @@
import axios from "axios";
import { JSDOM } from "jsdom";
import UserAgent from "user-agents";
export const getSteamAppAsset = (
@ -48,13 +49,16 @@ export const sleep = (ms: number) =>
export const requestWebPage = async (url: string) => {
const userAgent = new UserAgent();
return axios
const data = await axios
.get(url, {
headers: {
"User-Agent": userAgent.toString(),
},
})
.then((response) => response.data);
const { window } = new JSDOM(data);
return window.document;
};
export const isPortableVersion = () =>