Mercurial > hg > Feedworm
comparison FeedUpdater.py @ 112:e4038dd8cc0e
add a comment about a Feedparser bug wrt python3
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 31 Mar 2011 03:50:46 +0200 |
parents | b2a51c24f209 |
children |
comparison
equal
deleted
inserted
replaced
111:c17a224bc251 | 112:e4038dd8cc0e |
---|---|
19 | 19 |
20 def findFeedsToUpdate(session): | 20 def findFeedsToUpdate(session): |
21 return session.query(Feed).filter(Feed.next_update < datetime.now()) | 21 return session.query(Feed).filter(Feed.next_update < datetime.now()) |
22 | 22 |
23 def createNewFeed(url, session): | 23 def createNewFeed(url, session): |
24 # when updating to python3 see http://code.google.com/p/feedparser/issues/detail?id=260 | |
24 result = feedparser.parse(url) | 25 result = feedparser.parse(url) |
25 if result.has_key("title"): | 26 if result.has_key("title"): |
26 title = result["feed"].title | 27 title = result["feed"].title |
27 else: | 28 else: |
28 title = url | 29 title = url |