building correctly
This commit is contained in:
parent
ea998350be
commit
dfba351059
|
@ -1,13 +1,8 @@
|
||||||
(ns rss-tumblr.core
|
(ns rss-tumblr.core
|
||||||
[:require [crouton.html :as html
|
(:require [crouton.html :as html]
|
||||||
clojure.xml :as xml]])
|
[clojure.xml :as xml]))
|
||||||
|
|
||||||
(defn foo
|
(comment (html/parse "https://tumblr.com"))
|
||||||
"I don't do a whole lot."
|
|
||||||
[x]
|
|
||||||
(println x "Hello, World!"))
|
|
||||||
|
|
||||||
(html/parse "https://tumblr.com")
|
|
||||||
|
|
||||||
(defn getFeeds
|
(defn getFeeds
|
||||||
[opml-file]
|
[opml-file]
|
||||||
|
@ -31,4 +26,19 @@
|
||||||
; get the rss feed url
|
; get the rss feed url
|
||||||
(:attrs)
|
(:attrs)
|
||||||
(:xmlUrl)
|
(:xmlUrl)
|
||||||
(html/parse))
|
; grab content from the feed
|
||||||
|
(html/parse)
|
||||||
|
; get the vector of posts
|
||||||
|
(:content)
|
||||||
|
(filterv #(not (nil? (% :content))))
|
||||||
|
; RSS is weird...
|
||||||
|
; I should probably use a library for this
|
||||||
|
(first)
|
||||||
|
(:content)
|
||||||
|
(first)
|
||||||
|
(:content)
|
||||||
|
(first)
|
||||||
|
(:content)
|
||||||
|
; -- vector of posts achieved
|
||||||
|
; we only care about :tag "item"
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue