import requests
import re
content = requests.get('https://book.douban.com/').text
pattern=re.compile('<li.*?"cover".*?href=(.*?)title=(.*?).*"author">(.*?)</div>.*"year">(.*?)</span></li>',re.S)
results = re.findall(pattern, content)
for result in results:
url, name, author, date = result
author = re.sub('\s', '', author)
date = re.sub('\s', '', date)
print(url, name, author, date)
无响应,大家能告诉我什么原因吗?谢谢啦。
qq_花开花谢_0
弑天下