Python : 'module' has no attribute 'urlencode'

版权声明:本文为博主原创文章,可以转载,但须注明出处。 https://blog.csdn.net/weixin_38111667/article/details/86534661

urllib has been split up in Python 3. The urllib.urlencode() function is now urllib.parse.urlencode(), and the urllib.urlopen() function is now urllib.request.urlopen()

so

a b c
Python2 urllib.urlencode() urllib.urlopen()
Python3 urllib.parse.urlencode() urllib.request.urlopen()

猜你喜欢

转载自blog.csdn.net/weixin_38111667/article/details/86534661