|
_label__get(self)
Get or set any <label> element associated with this element. |
source code
|
|
|
|
|
|
|
drop_tree(self)
Removes this element from the tree, including its children and
text. The tail text is joined to the previous element or
parent. |
source code
|
|
|
drop_tag(self)
Remove the tag, but not its children or text. The children and text
are merged into the parent. |
source code
|
|
|
find_rel_links(self,
rel)
Find any links like <a rel="{rel}">...</a>; returns a list of elements. |
source code
|
|
|
find_class(self,
class_name)
Find any elements with the given class name. |
source code
|
|
|
get_element_by_id(self,
id,
*default)
Get the first element in a document with the given id. If none is
found, return the default argument if provided or raise KeyError
otherwise. |
source code
|
|
|
text_content(self)
Return the text content of the tag (and the text in any children). |
source code
|
|
|
cssselect(self,
expr)
Run the CSS expression on this element and its children,
returning a list of the results. |
source code
|
|
|
make_links_absolute(self,
base_url=None,
resolve_base_href=True)
Make all links in the document absolute, given the
base_url for the document (the full URL where the document
came from), or if no base_url is given, then the .base_url of the document. |
source code
|
|
|
resolve_base_href(self)
Find any <base href> tag in the document, and apply its
values to all links found in the document. Also remove the
tag once it has been applied. |
source code
|
|
|
iterlinks(self)
Yield (element, attribute, link, pos), where attribute may be None
(indicating the link is in the text). pos is the position
where the link occurs; often 0, but sometimes something else in
the case of links in stylesheets or style tags. |
source code
|
|
|
rewrite_links(self,
link_repl_func,
resolve_base_href=True,
base_href=None)
Rewrite all the links in the document. For each link
link_repl_func(link) will be called, and the return value
will replace the old link. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__init__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|