from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen('http://www.pythonscraping.com/pages/warandpeace.html')
bs = BeautifulSoup(html.read(), 'html.parser')
# find_all()返回的是所有匹配结果的列表
namelist = bs
Python 网络爬虫权威指南 2.2 选择标签
最新推荐文章于 2022-09-29 04:04:09 发布