Commit ac4f8ecf authored by Mudada's avatar Mudada

correct #3

parent bdf6b2de
......@@ -41,9 +41,11 @@ removeSub = do
sub = string "<sub>"
<|> string "<sup>"
<|> string "<i>"
<|> string "<b>"
asub = string "</sub>"
<|> string "</sup>"
<|> string "</i>"
<|> string "</b>"
type Query = Text
type Limit = Integer
......@@ -71,7 +73,9 @@ runSimpleFetchPubmedAbstractRequest ids = do
case parseOnly removeSub $ LBS.toStrict abs of
(Left err'') -> pure (Left $ T.pack err'')
(Right v) -> do
parsed <- catch (pubMedParser v) ((\e -> pure []) :: XmlException -> IO [PubMed])
parsed <- catch (pubMedParser v) ((\e -> do
_ <- print e
pure []) :: XmlException -> IO [PubMed])
Right <$> pure parsed
crawler :: Text -> Maybe Limit -> IO (Either Text [PubMed])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment