python 爬虫基础学习笔记
1.用 Python 登录网页
from urllib.request import urlopen
# if has Chinese, apply decode()
html = urlopen(
"https://mofanpy.com/static/scraping/basic-structure.html"
).read().decode('utf-8')
print(html)
2.匹配网页内容
** 2.1正则表达式**
##正则表达式
import re
res = re
原创
2021-08-12 22:57:50 ·
66 阅读 ·
0 评论