可以使用 select() 代码如下:
#coding=utf-8
import requests
from bs4 import BeautifulSoup
resp = requests.get('url')
soup = BeautifulSoup(resp.text, 'lxml')
content = soup.select_one('#content-left')
res = content.select('.article.block.untagged.mb15')
print(len(res))
本回答被提问者和网友采纳