[英]python html extract tags
How would it be possible to do the following: 如何执行以下操作:
h1 h2 ...hn Tags h1 h2 ... hn标签
and write all Headings to a file. 并将所有标题写入文件。 In the correct order:
按照正确的顺序:
Start with h1 Than h2 从h1开始比h2
until we reach the next h1 直到我们到达下一个h1
使用BeautifulSoup或PyQuery 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.