Hi to everyone,
due to the lack of documentation I'm struggling with the good Enlive
library.
I'm trying to get the meta keywords from a web page, to be clearer
from this:
<meta name="keywords" content="clojure, is, good" />
I want to extract only the content part. I've tried with something
like this:
(defn get-keywords-from
"Given the HTML URL of a web page, parses it and returns the
keywords
associated with the page."
[page-src]
(-> page-src java.net.URL. en/html-resource
(en/let-select [[meta] [:meta]]
(println meta))))
But it retrieve only the first meta field it encounter (usually <meta
http-equiv="Content-Type" content="text/html; charset=UTF-8" /> )
and I can't find a way to say "Hey Enlive, search for a node named
"meta" with the property "name" that matches "keywords" and give me
the content of the field "content".
I hope to have been clear :)
Bye and thanks,
Alfredo
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en