mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 14:50:20 +00:00
Add "tag" attribute for Element object
This commit is contained in:
@@ -103,7 +103,12 @@ Render out an :class:`Element <Element>`'s HTML:
|
||||
>>> about.html
|
||||
'<li aria-haspopup="true" class="tier-1 element-1 " id="about">\n<a class="" href="/about/" title="">About</a>\n<ul aria-hidden="true" class="subnav menu" role="menu">\n<li class="tier-2 element-1" role="treeitem"><a href="/about/apps/" title="">Applications</a></li>\n<li class="tier-2 element-2" role="treeitem"><a href="/about/quotes/" title="">Quotes</a></li>\n<li class="tier-2 element-3" role="treeitem"><a href="/about/gettingstarted/" title="">Getting Started</a></li>\n<li class="tier-2 element-4" role="treeitem"><a href="/about/help/" title="">Help</a></li>\n<li class="tier-2 element-5" role="treeitem"><a href="http://brochure.getpython.info/" title="">Python Brochure</a></li>\n</ul>\n</li>'
|
||||
|
||||
Crab an :class:`Element <Element>`'s root tag name:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> about.tag
|
||||
'li'
|
||||
|
||||
Select an :class:`Element <Element>` list within an :class:`Element <Element>`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user