Galera, estou estudando programação e usando a linguagem python.
Estou tentando extrair o preço do site: http:
www.beans-r-us.biz/prices.html
estou usando esse código:
import urllib.request
page = urllib.request.urlopen ("http:
www.beans-r-us.biz/prices.html")
text = page.read().decode("utf8")
print(text)
porém quando rodo está dando isso:
Traceback (most recent call last):
File "/Users/macbook_17/Desktop/Python/preco_cafe.py", line 3, in <module>
page = urllib.request.urlopen ("http:
www.beans-r-us.biz/prices.html")
File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/urllib/request.py", line 122, in urlopen
return _opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/urllib/request.py", line 356, in open
req = meth(req)
File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/urllib/request.py", line 1011, in do_request_
raise URLError('no host given')
urllib.error.URLError: <urlopen error no host given>
onde não consta o valor do grão.
dede já agradeço o help…
Abrass!