mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
ci: testing pipeline
This commit is contained in:
parent
7e3f53a0d0
commit
ae6484b7b1
27 changed files with 1349 additions and 1399 deletions
|
@ -4,7 +4,6 @@ import { formatUploadDate } from "@main/helpers";
|
|||
|
||||
import { Repack } from "@main/entity";
|
||||
import { requestWebPage, savePage } from "./helpers";
|
||||
import type { GameRepackInput } from "./helpers";
|
||||
|
||||
export const request1337x = async (path: string) =>
|
||||
requestWebPage(`https://1337xx.to${path}`);
|
||||
|
@ -68,7 +67,7 @@ export const extractTorrentsFromDocument = async (
|
|||
user: string,
|
||||
document: Document,
|
||||
existingRepacks: Repack[] = []
|
||||
): Promise<GameRepackInput[]> => {
|
||||
) => {
|
||||
const $trs = Array.from(document.querySelectorAll("tbody tr"));
|
||||
|
||||
return Promise.all(
|
||||
|
@ -108,7 +107,7 @@ export const getNewRepacksFromUser = async (
|
|||
user: string,
|
||||
existingRepacks: Repack[],
|
||||
page = 1
|
||||
): Promise<Repack[]> => {
|
||||
) => {
|
||||
const response = await request1337x(`/user/${user}/${page}`);
|
||||
const { window } = new JSDOM(response);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue