I was wondering how I could get a value, between some html tags, from some html code using python.
Say I wanted to get the price of a product in an amazon page:
I've got up to:
url = raw_input("Enter the url:\n")
sock = urllib.urlopen(url)
htmlsource = sock.read()
sock.close()
so now I got the html source as a string but I don't know how to extract the price. I've played around with re.search but can't get the right expression.
say the price is between <span class="price">£79.98</span>
What would be the best way to get var1 = 79.98?