Package us.codecraft.webmagic.selector
Class HtmlNode
java.lang.Object
us.codecraft.webmagic.selector.AbstractSelectable
us.codecraft.webmagic.selector.HtmlNode
- All Implemented Interfaces:
Selectable
- Direct Known Subclasses:
Html
- Author:
- code4crafer@gmail.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionselect list with css selectorselect list with css selectorprotected List<org.jsoup.nodes.Element>
links()
select all linksnodes()
get all nodesextract by custom selectorprotected Selectable
selectElements
(BaseElementSelector elementSelector) select elementsselectList
(Selector selector) extract by custom selectorselect list with xpathMethods inherited from class us.codecraft.webmagic.selector.AbstractSelectable
all, css, css, get, getFirstSourceText, jsonPath, match, regex, regex, replace, select, selectList, toString
-
Constructor Details
-
HtmlNode
-
HtmlNode
public HtmlNode()
-
-
Method Details
-
getElements
-
smartContent
-
links
Description copied from interface:Selectable
select all links- Returns:
- all links
-
xpath
Description copied from interface:Selectable
select list with xpath- Parameters:
xpath
- xpath- Returns:
- new Selectable after extract
-
selectList
Description copied from interface:Selectable
extract by custom selector- Specified by:
selectList
in interfaceSelectable
- Overrides:
selectList
in classAbstractSelectable
- Parameters:
selector
- selector- Returns:
- result
-
select
Description copied from interface:Selectable
extract by custom selector- Specified by:
select
in interfaceSelectable
- Overrides:
select
in classAbstractSelectable
- Parameters:
selector
- selector- Returns:
- result
-
selectElements
select elements- Parameters:
elementSelector
- elementSelector- Returns:
- result
-
$
Description copied from interface:Selectable
select list with css selector- Parameters:
selector
- css selector expression- Returns:
- new Selectable after extract
-
$
Description copied from interface:Selectable
select list with css selector- Parameters:
selector
- css selector expressionattrName
- attribute name of css selector- Returns:
- new Selectable after extract
-
nodes
Description copied from interface:Selectable
get all nodes- Returns:
- result
-
getSourceTexts
- Specified by:
getSourceTexts
in classAbstractSelectable
-