Skip to content

Instantly share code, notes, and snippets.

@fourier
Created February 24, 2015 16:59
Show Gist options
  • Save fourier/82dad590ffcd7c4c8ed1 to your computer and use it in GitHub Desktop.
Save fourier/82dad590ffcd7c4c8ed1 to your computer and use it in GitHub Desktop.
(defvar *feed* "https://www.eff.org/rss/updates.xml")
(defun parse-feed (status)
(let* ((start (- (search-forward "<?xml") 5))
(parsed (libxml-parse-xml-region start (buffer-size)))
(channel (nth 2 *contents*)))
(dolist (x channel)
(when (and (listp x) (equal (car x) 'item))
(dolist (y x)
(when (and (listp y) (equal (car y) 'title))
(message (nth 2 y))))))))
(url-retrieve *feed* 'parse-feed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment