I am getting some trouble with my code. The thing is that I'm extracting prices for a website and some of this prices includes the original price and the discounted one, and what i'm trying to get is only the discounted one. How do i fix it?
import requests
from bs4 import BeautifulSoup
search_url = "https://store.steampowered.com/search/?sort_by=Price_ASC&category1=998%2C996&category2=29"
category1 = ('998', '996')
category2 = '29'
params = {
'sort_by': 'Price_ASC',
'category1': ','.join(category1),
'category2': category2,
}
response = requests.get(
search_url,
params=params
)
soup = BeautifulSoup(response.text, "html.parser")
elms = soup.find_all("span", {"class": "title"})
prcs = soup.find_all("div",{"class": "col search_price discounted responsive_secondrow"})
for elm in elms:
print(elm.text)
for prc in prcs:
print(prc.text)