html ='<div class="info"> <span>上传用户:</span><span><a href="http://netdzb.yimuhe.com/">netdzb</a></span><span>文件大小:</span><span class="rightnone">15.77MB</span> <span>文件类型:</span><span>flac</span><span>下载次数:</span><span class="rightnone"><img src="/n_images/z1.gif" /> </span> <span>上传日期:</span><span>2021-01-03 07:45:16</span><span>用户收入:</span><span class="rightnone">保密 <a href="/n_money.html" target="_blank"><font color="#FF0000">想赚钱吗?</font></a></span> <div class="md5">MD5:9a61e37cc886a327928045ebf6a14610</div><div class="sha1">SHA1:35c3acb56e4b7749370426e9679da4ac23b5e70b</div></div>'
from bs4 import BeautifulSoup as bs
soup = bs(html,'html.parser')
#直接用HTML TAG的层级
print(soup.div.div.contents[0])
#或者
md5 = soup.find('div',attrs={'class':'md5'})
print(md5.text)
--
FROM 13.250.115.*