find specific text in beautifulsoup
问题 I have a specific piece of text i'm trying to get using BeautifulSoup and Python, however I am not sure how to get it using sou.find(). I am trying to obtain "#1 in Beauty" only from the following. <ul> <li>...<li> <li>...<li> <li id="salesRank"> <b>Amazon Best Sellers Rank:</b> "#1 in Beauty (" <a href="http://www.amazon.com/gp/bestsellers/beauty/ref=pd_dp_ts_k_1"> See top 100</a> ") Can anyone help me with this? 回答1: You need to use the find_all method of soup . Try below import urllib,