;;
;; RSS Title Slurp - (c) Norman 2004
;; version 1.1 stripped version
;; fixed for "!--"
;;
; http://rss.news.yahoo.com/rss/linux
; http://rss.news.yahoo.com/rss/cellphones
; http://newlisp.org/rss.cgi?News
(set 'url "http://rss.news.yahoo.com/rss/science" )
(println "** RSS Feed -> " url )
;;
;; DE-XML
;;
(xml-type-tags nil 'cdata '!-- nil)
(set 'url (xml-parse (get-url url) (+ 1 2 8 16) ))
;; pop until rss
(until (= (first (nth 0 url)) 'rss ) (pop url))
(set 'rsschannel (nth 2 (nth 0 url)))
(set 'rsschannellen (length rsschannel))
;;
;; Seeking for ITEMS in CHANNEL
;;
(dotimes (y rsschannellen)
(if (list? (nth y rsschannel))
(if (= (nth 0 (nth y rsschannel)) 'item )
(println "** RSS Item -> " (lookup 'title (nth y rsschannel))))))
(exit)
;; enjoy...
5 Cent tip for today [ RSS Title Slurper ]
5 Cent tip for today [ RSS Title Slurper ]
Last edited by newdep on Fri Jul 16, 2004 10:14 pm, edited 2 times in total.
-- (define? (Cornflakes))