23-python用BeautifulSoup用抓取a标签内所有数据 1.获取子标签: thr_msgs = soup.find_all('div',class_=re.compile('msg')) for i in thr_msgs: print (i) first ...
python3用BeautifulSoup用limit来获取指定数量的a标签 result: .<a class="sister" href="http://example.com/elsie" id="xiaodeng"><!-- Elsie ...