module Parser.Detail ( parseDetail ) where import Data.Text (Text) import qualified Data.Text as T import Text.HTML.TagSoup import Model.Detail import Parser.Utils parseDetail :: Text -> Detail parseDetail page = let tags = parseTags page description = parseDescription tags images = getTagAttributes "" (T.pack "content") tags in Detail { description = description, images = images } parseDescription :: [Tag Text] -> Maybe Text parseDescription tags = let descriptionTags = getTagsBetween "