Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 10c01a1b0b
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (15 sloc) 0.38 kb
(ns clj-htmlunit.core
(:import (com.gargoylesoftware.htmlunit WebClient)))
(def *client* (new WebClient))
(defn get-page
[url]
(.getPage *client* url))
(defn get-nodes-by-xpath
[node xpath]
(.getByXPath node xpath))
(defn get-node-anchors
[node]
(get-nodes-by-xpath node "//a"))
(defn get-nodes-anchors
[nodes]
(flatten (map #(get-node-anchors %) nodes)))
Jump to Line
Something went wrong with that request. Please try again.