About Python2.7 Module Error

2016-12-04 阅读量

(长期更)

16/11/20: from urllib.request import urlopen Try to use the following:

from urllib2 import Request           
from urllib2 import urlopen     

For Python2.7,we use urllib -> urllib2, request -> Request

16/12/04: from urllib import parse If you want urlparse using Python2.7, try to use the following:

from urlparse import urlparse