Created
August 31, 2012 07:33
-
-
Save joekarma/3549907 to your computer and use it in GitHub Desktop.
CSS Selectors (Not Working)
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
(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}>). | |
;; |
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
Cheers, thanks for fixing!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)