diff --git a/app/ZborBielawa.hs b/app/ZborBielawa.hs index 2f456e5..5b1b0ca 100644 --- a/app/ZborBielawa.hs +++ b/app/ZborBielawa.hs @@ -10,7 +10,7 @@ import Data.List.Utils (replace) import Text.Regex.Posix import Text.Printf - +import Debug.Trace extractNestedLinksWithText xpathCondition = (downloadDocument &&& this) >>> first (getXPathTrees xpathCondition @@ -27,7 +27,7 @@ getLinkAndText xpathCondition = proc doc -> do xpathTrees <- getXPathTrees xpathCondition -< doc href <- (getXPathTrees "//a" >>> getAttrValue "href") -< xpathTrees txt <- (listA (deep isText >>> getText) >>> arr (intercalate " ")) -< xpathTrees - returnA -< (href, txt) + returnA -< traceShowId (href, txt) extractNestedLinksWithText2 xpathCondition = proc url -> do @@ -77,4 +77,4 @@ main = do abbrev="ZboBiel", lLevel=0, webpage=start} - extractItemsStartingFromUrl shadowLibrary start (extractRecords >>> arr toShadowItem) + extractItemsStartingFromUrl shadowLibrary start (extractRecords2 >>> arr toShadowItem)