Skip to content

Commit fc78135

Browse files
committed
Refactoring
1 parent 1cbed6e commit fc78135

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

html_parsing/get_price_game/from_gog.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515

1616
def get_games(name: str) -> list[tuple[str, int]]:
17-
url = f"https://www.gog.com/games/ajax/filtered?language=ru&mediaType=game&page=1&search={name}"
17+
url = (
18+
"https://www.gog.com/games/ajax/filtered?"
19+
f"language=ru&mediaType=game&page=1&search={name}"
20+
)
1821

1922
rs = session.get(url)
2023
rs.raise_for_status()
2124

2225
data = rs.json()
2326

24-
return [
25-
(game["title"], game["price"]["amount"])
26-
for game in data["products"]
27-
]
27+
return [(game["title"], game["price"]["amount"]) for game in data["products"]]
2828

2929

3030
if __name__ == "__main__":

0 commit comments

Comments
 (0)