擅长:python、mysql、java
<p>文件
<a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/" rel="nofollow noreferrer">https://www.crummy.com/software/BeautifulSoup/bs4/doc/</a></p>
<pre><code>from bs4 import BeautifulSoup
a = '<p><b><lable style="color:#3097b0;"> Aganampudi ( Public Funded ) </lable></b> <br/>Km 728.055 - <b>NH-16 in Andhra Pradesh <br/> Stretch : </b>Vishakhapatnam - Ankapalli [Km 2.837 to &amp;Km; 395.870 to Km358.00(New Chainage From Km 700.544 to Km 740.255)] <br/> <b>Tollable Length :</b> Km 40.707 Km(s) </p>'
b = BeautifulSoup(a,'html.parser')
answer=list(b.descendants)[11]
#
list(b.descendants)[11]
Out[23]: 'Vishakhapatnam - Ankapalli [Km 2.837 to &Km; 395.870 to Km358.00(New Chainage From Km 700.544 to Km 740.255)] '
</code></pre>