(3-详细方法|如何对文档树进行遍历?)以下实例还是官网的例子:html_doc="""TheDormouse'sstoryTheDormouse'sstoryOnceuponatimetherewerethreelittlesisters;andtheirnameswereElsie,LacieandTillie;andtheylivedatthebottomofawell...."""frombs4importBeautifulSoupsoup=BeautifulSoup(html_doc,'html.parser')1子节点1.1tag的名字1.1.1获取head标签#获取headpri