diff options
Diffstat (limited to 'feedgetter.py')
-rw-r--r-- | feedgetter.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/feedgetter.py b/feedgetter.py index a51515fe..8c2d6e4c 100644 --- a/feedgetter.py +++ b/feedgetter.py @@ -12,6 +12,8 @@ import sqlite3 import threading import feedparser +from datetime import datetime + url_finders = [ \ re.compile("([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+)(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*[^]'\\.}>\\),\\\"]"), \ re.compile("([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+)(:[0-9]*)?"), \ @@ -84,7 +86,7 @@ class FeedGetter(object): for article in a_feed['entries']: try: self.c.execute('insert into rss_feed values (?,?,?,?,?)', (\ - "-".join([str(i) for i in list(article.updated_parsed)]), \ + datetime(*article.updated_parsed[:6]), \ a_feed.feed.title.encode('utf-8'), \ a_feed.feed.link.encode('utf-8'), \ article.title.encode('utf-8'), \ |