为什么以下代码片段无法正常工作?
(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])
我需要将html字符串转换为clojure数据结构吗,或者需要进行其他操作吗?
(select (html-snippet <option-list>) [:option])
解析您的选项列表时,我得到了({:tag :option, :attrs {:value ""}, :content ("--seleccionar--")} {:tag :option, :attrs {:value "010100"}, :content ("CHACHAPOYAS")} {:tag :option, :attrs {:value "010200"}, :content ("BAGUA")} ...)
我正在使用 enlive 1.1.1... - Daniel Neal