from bs4 import BeautifulSoup soup = BeautifulSoup(html_doc, 'html.parser') ... len(soup.contents) # 1 soup.contents[0].name # u'html'.
確定! 回上一頁