数据抓取
利用request库
import requests
r = requests.get("https://movie.douban.com/subject/3541415/comments")
文本解析
利用BeautifulSoup
from bs4 import BeautifulSoup
soup = BeautifulSoup(r.text, 'lxml')
pattern = soup.find_all('span','short')
for item in pattern:
print(item.string)
运行结果