I'm trying to get the price of the game from the epic games store, but I get a 403 error
import requests
from bs4 import BeautifulSoup
url = "https://store.epicgames.com/ru/p/cities-skylines"
response = requests.get(url)
if response.status_code == 200:
soup = BeautifulSoup(response.text, 'html.parser')
price_element = soup.find(class_='css-119zqif')
if price_element is not None:
price = price_element.get_text(strip=True)
print("Price Cities: Skylines:", price)
else:
print("Error")
else:
print("Error:", response.status_code)
I tried to access the game page directly, and take the price information from the class in html, but I get the error "Request error: 403"