Prefer content_encoded over description if it's available.
authorAdam Sampson <ats@offog.org>
Sat, 3 May 2003 12:49:25 +0000 (12:49 +0000)
committerAdam Sampson <ats@offog.org>
Sat, 3 May 2003 12:49:25 +0000 (12:49 +0000)
rawdog

diff --git a/rawdog b/rawdog
index 13b3991301ac9a6a11e8112502bafb0d016dbb5e..bbf94fa5b1b4c1e6f63c2453dcde81c713486f46 100644 (file)
--- a/rawdog
+++ b/rawdog
@@ -70,7 +70,10 @@ class Feed:
                for item in p["items"]:
                        title = maybe_get(item, "title")
                        link = maybe_get(item, "link")
-                       description = maybe_get(item, "description")
+                       if item.has_key("content_encoded"):
+                               description = item["content_encoded"]
+                       else:
+                               description = maybe_get(item, "description")
                        hash = hash_item(feed, title, link, description)
 
                        if articles.has_key(hash):