After python3.3 urllib2 can not be reused, can only be replaced by urllib.request

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/Tiger_lin1/article/details/87008855

After python3.3 urllib2 has become unusable, we can be replaced by urllib.request
Response = urllib2.urlopen ( '
File " b.py ", Line. 1, in
ImportError: No Module1 the named' urllib2 '
Response = urllib.urlopen ( 'File " b.py ", Line 2, in
http://www.baidu.com ')

The urllib2 to read urllib.request to run properly
Import urllib.request
Print (urllib.request. File )

Guess you like

Origin blog.csdn.net/Tiger_lin1/article/details/87008855