Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Python 和 Beautiful Soup 解析 HTML 网页(不过,我对其他解决方案持开放态度)。我想知道是否可以基于一行 HTML 解析文件,即get the td tag from line3. 这可能吗?
get the td tag from line3
考虑这个例子:http://www.pythonforbeginners.com/python-on-the-web/web-scraping-with-beautifulsoup/有href的逐行处理和匹配(你需要td)
http://www.pythonforbeginners.com/python-on-the-web/web-scraping-with-beautifulsoup/
另外考虑:soup.find_all("td", limit=3)
soup.find_all("td", limit=3)