~khurshid-alam/gwibber/gwibber-rss

« back to all changes in this revision

Viewing changes to gwibber/microblog/plugins/rssatom/__init__.py

  • Committer: Nils Dabrock
  • Date: 2011-04-07 16:41:09 UTC
  • Revision ID: nils@nilsdabrock.de-20110407164109-e0vkgizrwwle23vk
Removed debugging code and edited copyright notice

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
import feedparser
5
5
 
 
6
import calendar
6
7
import re
7
8
import time
8
9
from gettext import lgettext as _
39
40
    entry["mid"] = data["id"]
40
41
    entry["service"] = "rssatom"
41
42
    entry["account"] = self.account["id"]
42
 
    entry["time"] = time.mktime(getattr(data, "published_parsed", getattr(data, "updated_parsed", time.localtime())))
 
43
    entry["time"] = calendar.timegm(getattr(data, "published_parsed", getattr(data, "updated_parsed", time.gmtime())))
43
44
    entry["source"] = False
44
45
    entry["text"] = data["title"]
45
46
 
64
65
    try:
65
66
      feed_content = network.Download(self.account["url"]).get_string()
66
67
      feed = feedparser.parse(feed_content)
67
 
      #print [self._entry(entry) for entry in feed["entries"]]
68
68
      return [self._entry(entry) for entry in feed["entries"]]
69
69
    except Exception as e:
70
 
      print e
71
70
      log.logger.err("%s", e)