From 1ba22516fefe4b1a80b3eb3c85adb6a2027532b9 Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 19 Jul 2013 00:02:52 +0200 Subject: [PATCH] Small help for etag handler --- morss.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/morss.py b/morss.py index 4cb0859..8034149 100644 --- a/morss.py +++ b/morss.py @@ -238,6 +238,11 @@ class HTMLDownloader(urllib2.HTTPCookieProcessor): https_request = http_request class CacheDownload(urllib2.BaseHandler): + """ + Custom urllib2 handler to download a page, using etag/last-modified headers, + to save bandwidth. The given headers are added back into the header on error + 304 for easier use. + """ def __init__(self, cache="", etag=None, lastmodified=None, useragent=UA_RSS): self.cache = cache self.etag = etag