Browse Source

reformat a code block in ideal-flatmate-manchester.org file.

master
Craig Oates 2 months ago
parent
commit
5292619498
  1. 9
      ideal-flatmate-manchester.org

9
ideal-flatmate-manchester.org

@ -102,8 +102,13 @@ end of the day (at time of commit) and need to get some sleep.
do (with-open-file (in-stream file-path)
(let* ((doc (plump:parse in-stream))
(listing (lquery:$ doc ".card-infos-left" (text)))
(cleaned-price (first (cl-ppcre:all-matches-as-strings "\\d+" (first (str:split "room" (aref listing 0))))))
(cleaned-location (str:replace-all "," "" (second (str:split "room" (aref listing 0)))))
(cleaned-price
(first (cl-ppcre:all-matches-as-strings
"\\d+"
(first (str:split "room" (aref listing 0))))))
(cleaned-location
(str:replace-all "," ""
(second (str:split "room" (aref listing 0)))))
(url (lquery:$ doc "a" (attr "href"))))
(format out-stream "~d,~s,~d,~a,~a~%"
row-id

Loading…
Cancel
Save