用python查看网页代码的方法: 1、使用“import”导入requests包 import requests 2、使用requests包的get()函数通过网页链接获取网页的源码,然后使用print()语句输出就可以了 执行结果如下: 更多Python知识,请关注:Python自学网!!