forked from filipg/twilight-library
robot ver 1_1
This commit is contained in:
parent
c5061e5c32
commit
0c20f13b11
@ -28,12 +28,12 @@ toShadowItem (url, articleTitle) =
|
||||
|
||||
findText url =
|
||||
case url =~~ "[0-9]{4}.*" :: Maybe String of
|
||||
Just year -> replace "%20" " " (replace ".pdf" "" year)
|
||||
Just year -> replace "%C5%82" "l" (replace "%20" " " (replace ".pdf" "" year))
|
||||
otherwise -> error $ "unexpected url: " ++ url
|
||||
|
||||
|
||||
getDate url =
|
||||
case url =~~ "[0-9]{4}" :: Maybe String of
|
||||
case url =~~ "[0-9]{4}[-.][0-9]{2}[-.][0-9]{2}|[0-9]{4}" :: Maybe String of
|
||||
Just year -> replace "." "-" year
|
||||
otherwise -> error $ "unexpected url: " ++ url
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user