diff --git a/X.py b/X.py deleted file mode 100644 index 88011f8..0000000 --- a/X.py +++ /dev/null @@ -1,18 +0,0 @@ -from lxml import etree -html=""" - -
-

Page Title

-

Some text.

-

Section 1

-

More text.

-

Section 2

-
- -""" -from lxml import etree -selector = etree.HTML(html) -#修改xpath表达式 -result = selector.xpath('//h2') -print(result) -printf(selector) \ No newline at end of file