Posted 12 July 2011 - 01:57 AM
Posted 12 July 2011 - 02:32 PM
Posted 13 July 2011 - 08:32 AM
Posted 13 July 2011 - 01:26 PM
Posted 07 October 2011 - 03:03 AM
Traceback (most recent call last):
File "/Users/philippberndt/04_starbuzz2.py", line 3, in <module>
while price > 4.74:
TypeError: unorderable types: str() > float()
import urllib.request
price_float = 99.99
while price_float > 4.74:
page = urllib.request.urlopen("http://www.beans-r-us.biz/prices.html")
text = page.read().decode("utf-8")
where = text.find(">$")
start_of_price = where + 2
end_of_price = start_of_price + 4
price = text[start_of_price:end_of_price]
price_float = float(price)
print ("buy")
Posted 07 October 2011 - 03:14 AM
helenb, on 12 July 2011 - 01:57 AM, said:
http://beans.itcarlow.ie/prices.htmluse that url in your code
Posted 04 July 2012 - 06:34 PM