(2-详细方法|对象的种类有哪些?)1使用细节将一段文档传入BeautifulSoup的构造方法,就能得到一个文档的对象,;可以传入一段字符串或一个文件句柄,比如:frombs4importBeautifulSoupsoup=BeautifulSoup(open("index.html"))soup=BeautifulSoup("data")2对象的种类2.1种类说明BeautifulSoup将HTML文档转换成一个树形结构,每个节点都是Python对象;所有对象为4种:Tag,NavigableString,BeautifulSoup,Comment.2.2Tag对象与XML或HTML原生文