module ‘urllib.request‘ has no attribute ‘urlencode‘ 问题解决
python 再运行时会报错如下代码,基本上是python2 和python3的差异导致的
module 'urllib.request' has no attribute 'urlencode'
urllib' has no attribute 'urlopen
python2与python3对比 python2 python3 import urllib2 import urllib.request,urllib.error import urllib import urllib.request,urllib.error,urllib.parse import urlparse import urllib.parse import urlopen import urllib.request.urlopen import urlencode import urllib.parse.urlencode import urllib.quote import urllib.request.quote cookielib.CookieJar http.CookieJar urllib2.Request urllib.request.Request