Second day on web scraping using Python. I am trying to pull a substring within a string. I wrote the following python code using BeautifulSoup:
 containers = page_soup.findAll("li",{"class":"grid-tile "})
 container_test = containers[7]
 product_container = container_test.findAll("div",{"class":"product-
 swatches"})
 product = product_container[0].findAll("li")
 product[0].a.img.get("data-price")
This outputs the following:
'{"saleprice":"$39.90","price":""}'
How do I print out saleprice and price separately? Result should look like:
saleprice = $39.90
price = ""
 
     
    