building correctly

main
Anish Lakhwara 2022-03-25 17:18:06 +10:00
parent ea998350be
commit dfba351059
1 changed files with 19 additions and 9 deletions

View File

@ -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"
)