Skip to content

Instantly share code, notes, and snippets.

@joekarma
Created August 31, 2012 07:33
Show Gist options
  • Save joekarma/3549907 to your computer and use it in GitHub Desktop.
Save joekarma/3549907 to your computer and use it in GitHub Desktop.
CSS Selectors (Not Working)
(ql:quickload '(:drakma :closure-html :cxml :css-selectors))
(let ((page (chtml:parse
(drakma:http-request "http://www.google.com")
(cxml-dom:make-dom-builder))))
(css:query "div input" page))
;;
;; Fails with the following error message:
;;
;; There is no applicable method for the generic function
;; #<STANDARD-GENERIC-FUNCTION DOM:TAG-NAME (1)>
;; when called with arguments
;; (#<RUNE-DOM::DOCUMENT {100FEA6FF3}>).
;;
@bobbysmith007
Copy link

I thought there were plenty of tests for that case, but apparently not. Either way I opened an issue and fixed the bug you were having.

AccelerationNet/css-selectors#5

Thanks for the bug report,
Russ (bobbysmith007)

@bobbysmith007
Copy link

BTW, this is one of the reasons that I wrote that library, I'm sorry you encountered a bug on first use. I tend to use selectors other than element names, so I had never seen that bug, even though I have used this lib in production code.

I hope in the future you find it useful

@joekarma
Copy link
Author

Cheers, thanks for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment