Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on
win32
Type “help”, “copyright”, “credits” or “license()” for more information.
import urllib2
#输入URL函数response=urllib2.urlopen(‘htttp://www.baidu.com/’)
html=response.read()
print html
#输出源码
来源:CSDN
作者:小可爱J 专业嵌入式开发
链接:https://blog.csdn.net/weixin_45806384/article/details/104606424