feat: adjustments

This commit is contained in:
Zamitto
2024-04-27 19:54:37 -03:00
parent 2426eab371
commit ac3234aad9
2 changed files with 10 additions and 10 deletions

View File

@@ -11,17 +11,17 @@ export const requestSteam250 = async (path: string) => {
const { window } = new JSDOM(response.data);
const { document } = window;
return Array.from(document.querySelectorAll(".appline .title a")).map(
($title: HTMLAnchorElement) => {
return Array.from(document.querySelectorAll(".appline .title a"))
.map(($title: HTMLAnchorElement) => {
const steamGameUrl = $title.href;
if (!steamGameUrl) return null;
return {
title: $title.textContent,
objectID: steamGameUrl.split("/").pop(),
};
}
);
} as Steam250Game;
})
.filter((game) => game != null);
});
};