BeautifulSoup 使用select遍历输出的列表有空的,应该怎么删除
←如果以下回答对你有帮助,请点击右边的向上箭头及采纳下答案
for tit in soup.select(".shop_list dl "): title=tit.select(".tit_shop") if title!=[]: print(title)