问题代码:
import lxml selector = lxml.etree.HTML(resp.text)
代码报错:AttributeError: module 'lxml' has no attribute 'etree'
处理方法:
使用 lxml.etree之前要import:
import lxml.etree