aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/lib
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-02 18:56:27 +0200
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-02 18:56:27 +0200
commitb43010d2da88d91e8934ba7214a823453cbf6031 (patch)
tree6e8e1fd8d45832a59f8ec37e2009cc68069f2375 /pyaggr3g470r/lib
parentDisplay a picto when a feed is disabled due to errors when retrieving. (diff)
parentusing conf.DEFAULT_MAX_ERROR in feed template (diff)
downloadnewspipe-b43010d2da88d91e8934ba7214a823453cbf6031.tar.gz
newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.tar.bz2
newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.zip
Merged in jaesivsm/pyaggr3g470r (pull request #14)
Master
Diffstat (limited to 'pyaggr3g470r/lib')
-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