AttributeError: lxml.etree._Element object has no attribute xpth


AttributeError: lxml.etree._Element object has no attribute xpth
import lxml.etree as le

#   xpath  , 1 
# xpath1=xpth('//div[@class="floor-container popular_recommend"]/text()')
#   HTML , 2 
# xpath2=xpath('//div[@class="floor-container popular_recommend"]/ul/li/a//div[@class="title"]/text()')

with open('edu.html','r',encoding='utf-8')as f:
    #  edu.html
    html = f.read()
    #  html  XML 
    html_x = le.HTML(html)
    #  6 div 
    div_x_s = html_x.xpth('//div[@class="classify_cList"]')
    print(div_x_s)
    #print(len(div_x_s))
    #  
    #data_s=[]
    #  6 1 2 
    #for div_x in div_x_s:
        #  
       # category1 = div_x.xpath


得られた戻り結果は間違っていて、attributeError no attribute xpthを提示します.
D:\Python3.8.5\python.exe D:\ \ 3\ \myXpath_.py
Traceback (most recent call last):
  File "D:\ \ 3\ \myXpath_.py", line 14, in <module>
    div_x_s = html_x.xpth('//div[@class="classify_cList"]')
AttributeError: 'lxml.etree._Element' object has no attribute 'xpth'

Process finished with exit code 1


文ごとに検索した結果、xpthが書き間違えたことに気づき、xpathに変更してOKを再実行
D:\Python3.8.5\python.exe D:\ \ 3\ \myXpath_.py
[<Element div at 0x3335e48>, <Element div at 0x3335ea8>, <Element div at 0x3335ec8>, <Element div at 0x3335ee8>, <Element div at 0x3335f08>, <Element div at 0x3335f48>]
6

Process finished with exit code 0


コード自体は複雑ではありません.肝心なのは書く正確性、厳格性、細部です.