Skip to content

Commit 2740a33

Browse files
committed
Refactoring
1 parent fc78135 commit 2740a33

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

html_parsing/get_price_game/from_gog.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0"
1414

1515

16-
def get_games(name: str) -> list[tuple[str, int]]:
16+
def get_games(name: str) -> list[tuple[str, str]]:
1717
url = (
1818
"https://www.gog.com/games/ajax/filtered?"
1919
f"language=ru&mediaType=game&page=1&search={name}"
@@ -24,7 +24,10 @@ def get_games(name: str) -> list[tuple[str, int]]:
2424

2525
data = rs.json()
2626

27-
return [(game["title"], game["price"]["amount"]) for game in data["products"]]
27+
return [
28+
(game["title"], game["price"]["amount"])
29+
for game in data["products"]
30+
]
2831

2932

3033
if __name__ == "__main__":

0 commit comments

Comments
 (0)