Skip to content

Instantly share code, notes, and snippets.

@joekarma
Created June 15, 2011 02:27
Show Gist options
  • Save joekarma/1026362 to your computer and use it in GitHub Desktop.
Save joekarma/1026362 to your computer and use it in GitHub Desktop.
Trying to use css selectors with scraped data
(ql:quickload '(:drakma
:closure-html
:cxml-stp
:css-selectors))
(defun get-page-as-xml (url)
(let ((str (drakma:http-request url)))
(chtml:parse str (cxml-dom:make-dom-builder))))
(setf google-page (get-page-as-xml "http://www.google.com"))
(css:query "a" google-page)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment