building correctly
This commit is contained in:
parent
ea998350be
commit
dfba351059
|
@ -1,13 +1,8 @@
|
|||
(ns rss-tumblr.core
|
||||
[:require [crouton.html :as html
|
||||
clojure.xml :as xml]])
|
||||
(:require [crouton.html :as html]
|
||||
[clojure.xml :as xml]))
|
||||
|
||||
(defn foo
|
||||
"I don't do a whole lot."
|
||||
[x]
|
||||
(println x "Hello, World!"))
|
||||
|
||||
(html/parse "https://tumblr.com")
|
||||
(comment (html/parse "https://tumblr.com"))
|
||||
|
||||
(defn getFeeds
|
||||
[opml-file]
|
||||
|
@ -31,4 +26,19 @@
|
|||
; get the rss feed url
|
||||
(:attrs)
|
||||
(: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