forked from filipg/twilight-library
fix chelmek
This commit is contained in:
parent
a96e26c4ef
commit
ce0342076d
@ -12,7 +12,7 @@ import Text.Regex.Posix
|
||||
import Text.Printf
|
||||
|
||||
|
||||
extractRecords = extractLinksWithText "//div[@class='span4']//a[contains(@href,'o-nas')]" -- pary adres-tytuł
|
||||
extractRecords = extractLinksWithText "//div[@class='span4']//h2[@itemprop='name']/a[contains(@href,'o-nas')]" -- pary adres-tytuł
|
||||
>>> first (extractLinksWithText "//a[contains(@href,'.pdf')]") -- pobieramy stronę z adresu URL i wyciągamy linki z tej strony pasujące do wyrażenia XPathowego
|
||||
-- ostatecznie wyjdą trójki ((adres URL, tytuł artykułu), tytuł rocznika)
|
||||
|
||||
@ -25,7 +25,7 @@ toShadowItem ((url, articleTitle), yearlyTitle) =
|
||||
format = Just "pdf",
|
||||
finalUrl = url
|
||||
}
|
||||
where title = "yearlyTitle: " ++ replace "\"" "'" (replace "\t\t\t\t\t" "" (replace "\n" "" yearlyTitle)) ++ " articleTitle: " ++ articleTitle
|
||||
where title = replace "\"" "'" articleTitle
|
||||
date = getDate yearlyTitle
|
||||
|
||||
getDate yearlyTitle =
|
||||
|
Loading…
Reference in New Issue
Block a user