fix chelmek

This commit is contained in:
Maciej Ścigacz 2022-05-05 20:30:14 +02:00
parent a96e26c4ef
commit ce0342076d

View File

@ -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 =