网上导入tree的方法 from lxml import etree 在pycharm里会报错 换个方法 from lxml import html etree = html.etree 这样就可以使用了