This commit is contained in:
nlitkowski 2021-04-07 02:41:21 +02:00
parent e4458b5780
commit 3314561a8a

View File

@ -30,12 +30,11 @@ getLinkAndText xpathCondition = proc doc -> do
returnA -< (href, txt)
extractNestedLinksWithText2 xpathCondition = proc x -> do
doc <- downloadDocument -< x
thisValue <- this -< x
(a,b) <- getLinkAndText xpathCondition -< doc
uriFixed <- expandURIFixed -< (a,thisValue)
returnA -< (uriFixed, b)
extractNestedLinksWithText2 xpathCondition = proc url -> do
doc <- downloadDocument -< url
(link, text) <- getLinkAndText xpathCondition -< doc
uriFixed <- expandURIFixed -< (link, url)
returnA -< (uriFixed, text)
extractRecords = extractLinksWithText "(//aside[@class='widget widget_maxmegamenu']//a[@class='mega-menu-link'])[1]" -- pary adres-tytuł podstrony