forked from filipg/twilight-library
WIP
This commit is contained in:
parent
07b43649a9
commit
10c06c503c
@ -15,9 +15,10 @@ import Debug.Trace
|
|||||||
|
|
||||||
getLinkAndText xpathCondition = proc doc -> do
|
getLinkAndText xpathCondition = proc doc -> do
|
||||||
xpathTrees <- getXPathTrees xpathCondition -< doc
|
xpathTrees <- getXPathTrees xpathCondition -< doc
|
||||||
|
name <- getElemName -< xpathTrees
|
||||||
|
txt <- (getXPathTrees "../text()" >>> getText) -< xpathTrees
|
||||||
href <- (getXPathTrees "//a" >>> getAttrValue "href") -< xpathTrees
|
href <- (getXPathTrees "//a" >>> getAttrValue "href") -< xpathTrees
|
||||||
txt <- (deep isText >>> getText) -< xpathTrees
|
returnA -< trace ("AAAAAAAAAAAAAAAA " ++ show name) $ traceShowId (href, txt)
|
||||||
returnA -< traceShowId (href, txt)
|
|
||||||
|
|
||||||
|
|
||||||
extractNestedLinksWithText xpathCondition = proc url -> do
|
extractNestedLinksWithText xpathCondition = proc url -> do
|
||||||
|
Loading…
Reference in New Issue
Block a user