From a0c75238b9ab432c1f14a58dd05c146be14f5bc8 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 3 Nov 2013 13:30:16 +0100 Subject: [PATCH] Add ability to redirect feeds Useful for websites with API (facebook). Will be in use later. --- morss.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/morss.py b/morss.py index 2f9bf13..f76051a 100644 --- a/morss.py +++ b/morss.py @@ -421,6 +421,10 @@ def Gather(url, cachePath, options): style = cache.get('style') else: try: + if 'redirect' in cache: + url = cache.get('redirect') + log(url) + opener = SimpleDownload(cache.get(url), cache.get('etag'), cache.get('lastmodified'), decode=False) con = urllib2.build_opener(opener).open(url, timeout=TIMEOUT) xml = con.read()