title fix

This commit is contained in:
Kacper 2022-05-25 13:06:30 +02:00
parent aa45331cf7
commit cca2ef59d3

View File

@ -13,14 +13,14 @@ import Text.Printf
extractRecords = extractLinksWithText "//td/a[contains(@href,'.pdf')]"
toShadowItem :: (String, String) -> ShadowItem
toShadowItem (url, title) =
toShadowItem (url, monthlytitle) =
(defaultShadowItem url title) {
originalDate = Just date,
itype = "periodical",
format = Just "pdf",
finalUrl = url
}
where title = "title"
where title = (replace "\r" "" (replace "\n" "" (replace "\t" "" monthlytitle)))
date = getDate $ replace "%20" " " url
getDate :: String -> String