解析网页的写法汇总

python学习网 2019-08-19 23:02:02

 

 

 

  1. urllib 模块

from urllib import request

url = 'https://www.baidu.com/'
rsp = request.urlopen(url)
html = rsp.read()
html = html.decode()
print(html)

  

 

阅读(2389) 评论(0)