-
-
Save jimmyhmiller/e9e710bce6ee60171560e1052ce49539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[meander.epsilon :as m]) | |
(m/search | |
[:main | |
[:div {:class "cal-listitem"} | |
[:h1 "thing"] | |
[[:div {:class "cal_date_show"} | |
[:div {:class "cal_date_day"} "1"] | |
[:div {:class "cal_date_date"} "12-09-2019"] | |
[:div {:class "cal_date_time"} "400 pm"] | |
[:div {:class "calinfo"} "Stuff here1"]] | |
[:div {:class "cal_date_show"} | |
[:div {:class "cal_date_day"} "1"] | |
[:div {:class "cal_date_date"} "12-09-2019"] | |
[:div {:class "cal_date_time"} "400 pm"] | |
[:div {:class "calinfo"} "Stuff here2"]]] | |
[:div {:class "listinfo"} | |
[:div {:class "thetitles"} "stuff"] | |
[:div {:class "thetitles"} "thing"] | |
[:div {:class "thetitles"} "more things"]] | |
[:div "Thing after"]]] | |
(m/$ [:main | |
. _ ... | |
(m/$ [_ {:class "cal-listitem"} | |
. _ ... | |
(m/scan [_ {:class "cal_date_show"} | |
_ | |
[_ {:class "cal_date_date"} ?date] | |
[_ {:class "cal_date_time"} ?time] | |
[_ {:class "calinfo"} ?info] | |
& _]) | |
. _ ... | |
(m/$ [_ {:class "listinfo"} | |
. _ ... | |
[_ {:class "thetitles"} ?titles] | |
& _]) | |
& _]) | |
& _]) | |
[?date ?time ?info ?titles]) | |
;; this returns | |
;; => | |
(["12-09-2019" "400 pm" "Stuff here1" "stuff"] | |
["12-09-2019" "400 pm" "Stuff here1" "thing"] | |
["12-09-2019" "400 pm" "Stuff here1" "more things"] | |
["12-09-2019" "400 pm" "Stuff here2" "stuff"] | |
["12-09-2019" "400 pm" "Stuff here2" "thing"] | |
["12-09-2019" "400 pm" "Stuff here2" "more things"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment