2

I need to download some contents of a web page daily and I plan on using enlive for that. Trouble is, that I need to log in in with a POST first and the authentification of the page that I am interested in is then done with the session's cookies. So I can't just use

(html/html-resource (java.net.URL. url))

I didn't find a way to do this in clojure. Otherwise doing the reading in Java would be fine as well. In the end it should work as a worker on heroku.

Thanks!

4

1 回答 1

1

你需要一个 http-client 来创建一个有效的会话。您可以使用 clj-http 的Cookie Store来简化跨请求维护 cookie。

于 2014-07-21T17:42:25.770 回答