Optymalizacje

This commit is contained in:
Jan Nowak 2021-04-17 18:13:05 +02:00
parent bc3ebf2eaa
commit bf137cf60a

View File

@ -33,7 +33,7 @@ mToString n
extractMonth :: String -> String extractMonth :: String -> String
extractMonth n = extractMonth n =
case n =~~ ("[A-za-z]+" :: String) of case n =~~ ("[A-za-z]+" :: String) of
Just month -> mToString (baseMonthNameToNumber (toLowerString month)) Just month -> eliminate (baseMonthNameToNumber (toLowerString month))
otherwise -> "" otherwise -> ""
mExtractYear :: String -> String mExtractYear :: String -> String
@ -43,7 +43,7 @@ mExtractYear n =
otherwise -> "" otherwise -> ""
changeDate :: String -> String changeDate :: String -> String
changeDate a = mExtractYear a ++ "-" ++ extractMonth a changeDate a = eliminate (extractYear a) ++ "-" ++ extractMonth a
extractRecords = extractLinksWithText "(//a[@class='magazine-list__year-item'])[last()]" -- pary adres-tytuł extractRecords = extractLinksWithText "(//a[@class='magazine-list__year-item'])[last()]" -- pary adres-tytuł