|
@@ -77,12 +77,17 @@
|
|
|
(defun parse-rss (url)
|
|
(defun parse-rss (url)
|
|
|
(let ((plump:*tag-dispatchers* plump:*xml-tags*))
|
|
(let ((plump:*tag-dispatchers* plump:*xml-tags*))
|
|
|
(loop for item in (get-by-tag (xml-request url) "item")
|
|
(loop for item in (get-by-tag (xml-request url) "item")
|
|
|
- collect (make-feed-item :guid (child-text item "guid")
|
|
|
|
|
|
|
+ collect (make-feed-item :guid (or (child-text item "guid") (child-text item "link"))
|
|
|
:link (child-text item "link")
|
|
:link (child-text item "link")
|
|
|
:title (clean-text (child-text item "title"))
|
|
:title (clean-text (child-text item "title"))
|
|
|
:description (clean-text (child-text item "description"))
|
|
:description (clean-text (child-text item "description"))
|
|
|
- :published (local-time:universal-to-timestamp
|
|
|
|
|
- (date-time-parser:parse-date-time (child-text item "pubDate")))))))
|
|
|
|
|
|
|
+ :published
|
|
|
|
|
+ (ignore-errors
|
|
|
|
|
+ (alexandria:when-let
|
|
|
|
|
+ (pub (or (child-text item "pubDate")
|
|
|
|
|
+ (child-text item "published")))
|
|
|
|
|
+ (local-time:universal-to-timestamp
|
|
|
|
|
+ (date-time-parser:parse-date-time pub))))))))
|
|
|
|
|
|
|
|
(defun format-feed-item (feed item)
|
|
(defun format-feed-item (feed item)
|
|
|
(format nil "~A~@[ @ ~A~]~%~A~%~A"
|
|
(format nil "~A~@[ @ ~A~]~%~A~%~A"
|