From 318292532a877c308403c45795d229fad659d900 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 18 Jun 2018 23:15:12 +0200 Subject: Add seLoger parser --- src/parser/haskell/Parser/SeLogerParser.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/parser/haskell/Parser/SeLogerParser.hs (limited to 'src/parser/haskell') diff --git a/src/parser/haskell/Parser/SeLogerParser.hs b/src/parser/haskell/Parser/SeLogerParser.hs new file mode 100644 index 0000000..dc2a5c2 --- /dev/null +++ b/src/parser/haskell/Parser/SeLogerParser.hs @@ -0,0 +1,24 @@ +module Parser.SeLogerParser + ( parse + ) where + +import Data.Maybe (catMaybes) +import Data.Text (Text) +import qualified Data.Text as T +import Text.HTML.TagSoup + +import Model.Ad (Ad (Ad)) +import Parser.Utils + +parse :: Text -> [Ad] +parse page = + catMaybes . fmap parseAd $ partitions (~== (T.unpack "