• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

news4 - RSS aggrigation system


Commit MetaInfo

Revision32bf686b742747550815da3f22823db8d90a2fb1 (tree)
Zeit2012-12-04 13:23:06
Autorhylom <hylom@user...>
Commiterhylom

Log Message

temporary fix: error ocurred when RSS's description is not exist

Ändern Zusammenfassung

Diff

--- a/fetcher.py
+++ b/fetcher.py
@@ -18,11 +18,15 @@ class FeedFetcher(object):
1818 f = feedparser.parse(self._feed["source"])
1919 entries = []
2020 for e in f['entries']:
21+ try:
22+ desc = e.description
23+ except AttributeError:
24+ desc = ''
2125 entry = {
2226 # 'title': e.title.decode('utf8') if isinstance(e.title, str) else e.title,
2327 'title': e.title,
2428 'url': e.link,
25- 'body': e.description,
29+ 'body': desc,
2630 'date': dateutil.parser.parse(e.updated),
2731 'feed': self._feed,
2832 'tags': [],