我正在使用Python3.4中的BeautifulSoup进行一些网络抓取。现在,我在学习过程中遇到了一个问题:我试图从网页中获取一个表行,并且我使用find_all()来获取它们,但是在表中--有更多的表中有表行!如何在BeautifulSoup中只获得标签的顶级/一级通用或特定元素?# Retrieves all the row ('tr') tags in table
my_table.find_a
= link.get('href') for i in link: title = link.string print(title)
输出: python浮点舍入python非谷歌合作python flask python漂亮汤python nonetype python ubuntu等。在从堆栈溢出站点提取数据时,我们在抓取问题的标签时遇到了问题。我们可以<