From 6472697a7970171484b68c1dff3e61fc6c53957f Mon Sep 17 00:00:00 2001 From: nlitkowski Date: Wed, 7 Apr 2021 02:53:08 +0200 Subject: [PATCH] WIP --- app/ZborBielawa.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)