Comments

You must log in or register to comment.

asdfasdf wrote

What a waste to spin up a browser and parse through HTML. Just grab the method, action URL and fields you need and do something like this:

(let ((cookies (make-instance 'drakma:cookie-jar)))
  (drakma:http-request "https://website.org/login"
                       :method :post
                       :cookie-jar cookies
                       :parameters '(("username" . "foo")
                                     ("password" . "bar"))))

Now use :cookie-jar cookies for every other request you make in the let.

1