Getting meta tags from a page source using Selenium Python
I'm trying to fetch the data from the URL
https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher&hl=en
and fetch the below data
<meta content="3.99" itemprop="price">
I used the following code implemented in Python to fetch but it failed.
browser = webdriver.Firefox() # Get local session of firefox
browser.get(sampleURL) # Load page
assert "Google Play" in browser.title
priceValue = browser.find_element_by_xpath("//div[@itemprop='price']")#
print priceValue.text
But it says it can't find the xpath of value price. Any idea why?
No comments:
Post a Comment