I am trying to scrape the price of an item off of an eCommerce website using beautiful soup with python 3. What else do I have to do to extract the price from my first pull?
I have tried other combinations of the code, but do not have a strong understanding of this method.
import requests
from bs4 import BeautifulSoup
page = requests.get('https://www.walmart.com/ip/GoGreen-Power-6-Outlet-Surge-Protector-16103MS-2-5-cord-White/46097919')
soup = BeautifulSoup(page.text, 'html.parser')
price_hide = soup.find(class_='price-characteristic')
print(price_hide)
wprice = price_hide.find_all(content)
print(wprice)
First print function works
<span class="price-characteristic" content="3.98" itemprop="price">3</span>
Second one not so much.
I would expect the content price of 3.98 to be printed