Add ability to redirect feeds

Useful for websites with API (facebook). Will be in use later.
master
pictuga 2013-11-03 13:30:16 +01:00
parent 7504cfed2a
commit a0c75238b9
1 changed files with 4 additions and 0 deletions

View File

@ -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()