soup = BeautifulSoup(requests.get(url).text, 'html.parser')
soup.find('span', class_='item_hot_topic_title') 这个是只能找到第一个span标签 样式为 class='item_hot_topic_title',就算后面还有匹配的也不去获取
span.find_all('span', class_='item_hot_topic_title') 这个就能找到页面上所有span标签 样式为 class='item_hot_topic_title'
本文介绍了如何使用Python的BeautifulSoup库来解析HTML网页,详细解释了'soup.find'与'soup.find_all'的区别,前者仅查找首个匹配项,而后者查找所有匹配项。

被折叠的 条评论
为什么被折叠?



