Created
March 10, 2014 13:21
-
-
Save kouphax/9464818 to your computer and use it in GitHub Desktop.
scrapes the download links for qcon2014 slides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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