aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-06-06 15:43:04 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-07-02 15:34:16 +0200
commitb682feb33d2830f2095eeb88123e05960f64ad1a (patch)
tree7040f53421c0e42e8beb6af0b9b87047e3033cf8 /pyaggr3g470r
parentadding unread count when listing feeds, using count_by_feed for user management (diff)
downloadnewspipe-b682feb33d2830f2095eeb88123e05960f64ad1a.tar.gz
newspipe-b682feb33d2830f2095eeb88123e05960f64ad1a.tar.bz2
newspipe-b682feb33d2830f2095eeb88123e05960f64ad1a.zip
registering an strftime even if headers don't provide one
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/lib/crawler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyaggr3g470r/lib/crawler.py b/pyaggr3g470r/lib/crawler.py
index c4c80ad4..324f0d8e 100644
--- a/pyaggr3g470r/lib/crawler.py
+++ b/pyaggr3g470r/lib/crawler.py
@@ -21,6 +21,7 @@ import dateutil.parser
from hashlib import md5
from functools import wraps
from datetime import datetime
+from time import strftime, gmtime
from concurrent.futures import ThreadPoolExecutor
from requests_futures.sessions import FuturesSession
from pyaggr3g470r.lib.utils import default_handler
@@ -189,7 +190,8 @@ class PyAggUpdater(AbstractCrawler):
dico = {'error_count': 0, 'last_error': None,
'etag': self.headers.get('etag', ''),
- 'last_modified': self.headers.get('last-modified', ''),
+ 'last_modified': self.headers.get('last-modified',
+ strftime('%a, %d %b %Y %X %Z', gmtime())),
'site_link': self.parsed_feed.get('link')}
if not self.feed.get('title'):
dico['title'] = self.parsed_feed.get('title', '')
bgstack15