Why does the following snippet does not work?
(html/select (:body (client/post "http://www.web.onpe.gob.pe/modElecciones/elecciones/elecciones2011/2davuelta/onpe/presidente/extras/provincias.php" {:form-params {"elegido" "010000"}})) [:option])
Do I have to do something with the html-string to turn it into a clojure datastructure first or something like that?
Yep - you can use html/html-snippet
to turn a raw html string into something enlive can use,
or html/html-resource
to use an entire html file.
Try the following:
(html/select
(html/html-snippet
(:body (client/post "<your-website>" {:form-params {"elegido" "010000"}}))
[:option])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With