aboutsummaryrefslogtreecommitdiff
path: root/src/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/Parser')
-rw-r--r--src/Parser/Resume.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Parser/Resume.hs b/src/Parser/Resume.hs
index f300ec3..8940be7 100644
--- a/src/Parser/Resume.hs
+++ b/src/Parser/Resume.hs
@@ -2,7 +2,8 @@ module Parser.Resume
( parse
) where
-import Data.Maybe (catMaybes)
+import Data.Maybe (catMaybes, isJust)
+import Data.List (find)
import Data.Text (Text)
import qualified Data.Text as T
@@ -26,4 +27,5 @@ parseResume item = do
name <- getTagTextAfter "<h2 class=item_title>" item
let price = getTagTextAfter "<h3 class=item_price>" item
url <- getTagAttribute "<a>" (T.pack "href") item
- return (Resume name price (T.concat [T.pack "https:", url]))
+ let isPro = isJust . find (~== "<span class=ispro>") $ item
+ return (Resume name price (T.concat [T.pack "https:", url]) isPro)