直到我必须获取每个顶级结果的href并打开它。TypeError: startfile: filepath should be string, bytes or os.PathLike, not NoneType 下面是html的外观: <a hreffor i in range(numberTabs): webbrowser.open(url) 它做它应该做的事情,直到for循环它看起来与书中的示例程序非常相似,所以我不明白为什么</e
我正在尝试打印“泛型行列表”和该列表后面的所有链接;可以在此链接的底部找到from bs4 import BeautifulSoup
for link in soup.findAll('a', {'class': 'a href'}): #links are a for anchors in HTML