Crawler Code:
import requests
import re
content = requests.get("https://book.douban.com/").text
pattern = re.compile("<li.*?cover.*?href="(.*?)".*?title="(.*?)".*?more-meta.*?author">(.*?)</span>.*?year">(.*?)</span>.*?<li>",re.S)
results = re.findall(pattern,content)
print(results)
for result in results:
url,name,author,date = result
author = re.sub("\s",author)
date = re.sub("\s","",date)
print(url,name,author,date)
execution has been shown to be in execution, but there is no result and no error has been reported. I have been waiting for an hour. Ask God for help to see what the problem is
.