XPath from lxml import etreetext = '''<!doctype html><html lang="zh" data-hairline="true" data-theme="light"><head> <meta charSet="utf-8" /> <title json 2024-09-09 200 点赞 3 评论 303 浏览