text: 
  from lxml import etree
  
  #需要解析器，否则会报错
  parser = etree.HTMLParser(encoding="utf-8")
  #
  tree = etree.parse('hello.html', parser=parser)
  # result = tree.xpath("/html/body/ul/li/a/text()")
  # result = tree.xpath("/html/body/ul/li[1]/a/text()") #xpath,[索引]
  # result = tree.xpath("/html/body/ol/li/a[@href='dapao']/text()") #
  # print(result)
  
  # ol_li_list = tree.xpath("/html/body/ol/li") #
  # for li in ol_li_list:
  #     #提取文字
  #     text = li.xpath("./a/text()")   #在li中继续查找，相对查找, ./当前目录
  #     url = li.xpath("./a/@href")     #使用 @属性 拿值
  #     print(url)
  
  # result = tree.xpath("/html/body/ul/li/a/@href")
  # print(result)
  
  result = tree.xpath('/html/body/div[1]/text()')
  print(result)