Use the 'link' field to get a link from feeds.
authorNelson Elhage <nelhage@mit.edu>
Sun, 3 Jan 2010 16:25:21 +0000 (11:25 -0500)
committerNelson Elhage <nelhage@mit.edu>
Sun, 3 Jan 2010 16:43:40 +0000 (11:43 -0500)
scan-feeds.py

index 6373316005a104baa2666ed68b980d23708e7831..bc82608b1e21c94a7c29439bc5f56a4912c994cd 100755 (executable)
@@ -21,17 +21,7 @@ def get_date(post):
     return post.updated
 
 def get_link(post):
-    if 'links' in post:
-        links = dict((l.rel, l) for l in post.links if 'html' in l.type)
-        if 'self' in links:
-            return links['self'].href
-        elif 'alternate' in links:
-            return links['alternate'].href
-    if 'href' in post:
-        return post.href
-    if 'link' in post:
-        return post.link
-    return None
+    return post.link
 
 def parse_feeds(weeks, uri):
     feed = feedparser.parse(uri)

Benjamin Mako Hill || Want to submit a patch?