import urllib from lxml.html import fromstring url = 'https://www.facebook.com/' html = urllib.urlopen(url).read();
Результат:
AttributeError: module ‘urllib’ has no attribute ‘urlopen’
В чём проблема ?
import urllib from lxml.html import fromstring url = 'https://www.facebook.com/' html = urllib.urlopen(url).read();
AttributeError: module ‘urllib’ has no attribute ‘urlopen’
>>> import urllib.request >>> urllib.request.urlopen <function urlopen at 0xb73ce614> >>>