Commits

Miki Tebeka committed 92f1346

make-feed

Comments (0)

Files changed (1)

      :title (.getTitle e)
      :updated (.getUpdatedDate e)}))
 
+(defn- make-feed [url]
+  (let [url (new URL url)
+        reader (new XmlReader url)
+        input (new SyndFeedInput)]
+    (.build input reader)))
+
 (defn parse [url]
-  (let [url (new URL url)
-        input (new SyndFeedInput)
-        feed (.build input (new XmlReader url))]
+  (let [feed (make-feed url)]
     {
      ; FIXME: This can be probably done nicer with a macro
      :author (.getAuthor feed)