如何使用BeautifulSoup

网页信息如图,求指点一下怎么用BeautifulSoup提取图片上划横线的信息呢,这几个都要分别分开来提取

img

建议先看看这几篇文章,有什么问题,请回复
https://www.baidu.com/link?url=xexfw2IDqY3NUSuSZc8EO7s2QFz84GPxwyGMR5jclQz24Ogwc2U2-FuOo1GE4UASB-if7_YazCiTH6N3Fcr9cfJYkZOcSZdIBX-kn8FujDm&wd=&eqid=d7bad45a0001b8aa00000006624d89b5
https://blog.csdn.net/qq_35490191/article/details/80598620
https://www.baidu.com/link?url=62xnA0ttf2ci8saesldxX1AIN81n5RDcFwdPBt4M2EfsUWP44s7kxU3zxXyErSFSAdeZaoQyh2Hfh8z4WAt1IEx3STmYTn7JZeA74LYllny&wd=&eqid=e7872a490006485600000006624d8953
https://www.baidu.com/link?url=62xnA0ttf2ci8saesldxX1AIN81n5RDcFwdPBt4M2EfsUWP44s7kxU3zxXyErSFSAdeZaoQyh2Hfh8z4WAt1IEx3STmYTn7JZeA74LYllny&wd=&eqid=e7872a490006485600000006624d8953

学习笔记_02(单元四:Beautiful Soup入门&单元五:信息标记与提取方法)
https://blog.csdn.net/weixin_45033674/article/details/105750547/


>>> import requests, bs4
>>> res = requests.get('http://nostarch.com')
>>> res.raise_for_status()
>>> bs = bs4.BeautifulSoup(res.text)

bs.select("a[data-sa-d]")[0].getText()
from bs4 import BeautifulSoup
import re

soup = BeautifulSoup(html)
for key in soup.select(".mind-book"):
    url = re.findall('http://book.zongheng.com/book/\d+.html',str(key))[0]
    book_id= re.findall('\d+',url)[0]
    temp = key.text[3:-2].split("\n")
    name = temp[0]
    content = temp[1]
    author = temp[2]
    update = temp[3]
    print(url,book_id,name,content,author,update)