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)
|
||||
|
||||
@ -24,8 +24,8 @@ toShadowItem ((url, articleTitle), yearlyTitle) =
|
||||
itype = "periodical",
|
||||
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