Skip to content

Instantly share code, notes, and snippets.

@kouphax
Created March 10, 2014 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kouphax/9464818 to your computer and use it in GitHub Desktop.
Save kouphax/9464818 to your computer and use it in GitHub Desktop.
scrapes the download links for qcon2014 slides
(ns qcon2014.core
(require [net.cgrand.enlive-html :refer [html-resource select]]))
(defn get-slide-links []
(->> ["wednesday" "thursday" "friday"]
(map #(str "http://qconlondon.com/london-2014/schedule/" % ".jsp"))
(map #(html-resource (java.net.URL. %)))
(mapcat #(select % [:a]))
(filter #(= (:content %) '("Download slides")))
(map #(get-in % [:attrs :href]))
(map #(str "http://qconlondon.com" %))))
(for [link (get-slide-links)]
(println link))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment