Add "lineno" attribute for Element object

This commit is contained in:
Li Yun
2018-07-04 11:30:59 +08:00
parent 116a4b08eb
commit 1c21f63672
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -110,6 +110,13 @@ Crab an :class:`Element <Element>`'s root tag name:
>>> about.tag
'li'
Show the line number that an :class:`Element <Element>`'s root tag located in:
.. code-block:: pycon
>>> about.lineno
249
Select an :class:`Element <Element>` list within an :class:`Element <Element>`:
.. code-block:: pycon