I am trying to pick up the price attribute in the below html:
<html><body><p>[<meta content="60.00" itemprop="price"/>]</p></body></html>
I am using the beautifulsoup library in python3.
Below is my current code. However i have tried many iterations of things using the docs.
soup = bs4.BeautifulSoup(res.text, 'lxml')
soup = bs4.BeautifulSoup(str(price), 'lxml')
for element in soup.find_all():
print(element ["content"])
Currently the above code just prints out the same html line again.
The result i am trying to achieve is using the 'content' attribute, which isn't always 'content' but in this case it is, and retrieving the value of 60.00.
Any help would be appreciated.
Thanks!