import requestsimport recontent = requests.get('https://book.douban.com/').textpattern=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)无响应,大家能告诉我什么原因吗?谢谢啦。
添加回答
举报
0/150
提交
取消