This commit is contained in:
s434695 2021-04-19 23:58:35 +02:00
parent cc670f1f7c
commit c77fe1a502

View File

@ -19,12 +19,13 @@ extractRecords = extractLinksWithText "//a[@class='image-link']" -- pary adres-
toShadowItem :: ((String, String),String) -> ShadowItem
toShadowItem ((url, articleTitle), yearlyTitle) =
(defaultShadowItem url title) {
--originalDate = Just date,
itype = "periodical",
format = Just "pdf",
finalUrl = url
}
where title = "Pbsociety "
where title = "Pbsociety " ++ yearlyTitle ++ " " ++ articleTitle
--date = getDate url
getDate url =
case url =~~ "/(19[0-9][0-9]|20[0-9][0-9])/" :: Maybe [[String]] of
Just [[_, year]] -> year