https://www.douban.com/robots.txt
robots.txt 相應網(wǎng)站的爬蟲協(xié)議哎垦,注意看有沒有不讓抓取的網(wǎng)頁
import requests
from bs4 import BeautifulSoup
r =requests.get("https://book.douban.com/subject/4923621/")
soup =BeautifulSoup(r.text,"lxml")
pattern =soup.find_all("span","short")
for item in pattern:
print(item.string)