Add ability to redirect feeds
Useful for websites with API (facebook). Will be in use later.master
parent
7504cfed2a
commit
a0c75238b9
4
morss.py
4
morss.py
|
@ -421,6 +421,10 @@ def Gather(url, cachePath, options):
|
||||||
style = cache.get('style')
|
style = cache.get('style')
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
if 'redirect' in cache:
|
||||||
|
url = cache.get('redirect')
|
||||||
|
log(url)
|
||||||
|
|
||||||
opener = SimpleDownload(cache.get(url), cache.get('etag'), cache.get('lastmodified'), decode=False)
|
opener = SimpleDownload(cache.get(url), cache.get('etag'), cache.get('lastmodified'), decode=False)
|
||||||
con = urllib2.build_opener(opener).open(url, timeout=TIMEOUT)
|
con = urllib2.build_opener(opener).open(url, timeout=TIMEOUT)
|
||||||
xml = con.read()
|
xml = con.read()
|
||||||
|
|
Loading…
Reference in New Issue