We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ea94e0 commit f13fa2fCopy full SHA for f13fa2f
api/game/services/game.js
@@ -24,19 +24,10 @@ async function getGameInfo(slug) {
24
const body = await axios.get(`https://www.gog.com/game/${slug}`);
25
const dom = new JSDOM(body.data);
26
27
- const ratingElement = dom.window.document.querySelector(
28
- ".age-restrictions__icon use"
29
- );
30
-
31
const description = dom.window.document.querySelector(".description");
32
33
return {
34
- rating: ratingElement
35
- ? ratingElement
36
- .getAttribute("xlink:href")
37
- .replace(/_/g, "")
38
- .replace(/[^\w-]+/g, "")
39
- : "BR0",
+ rating: "BR0",
40
short_description: description.textContent.trim().slice(0, 160),
41
description: description.innerHTML,
42
};
0 commit comments