Support for combined feedsportal and feedburner.
parent
93b098ab11
commit
0a97a2a2b5
7
morss.py
7
morss.py
|
@ -288,15 +288,16 @@ def Fill(rss, cache):
|
||||||
log('provided')
|
log('provided')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if '{http://rssnamespace.org/feedburner/ext/1.0}origLink' in item:
|
||||||
|
item.link = item['{http://rssnamespace.org/feedburner/ext/1.0}origLink']
|
||||||
|
log(item.link)
|
||||||
|
|
||||||
match = re.search('/([0-9a-zA-Z]{20,})/story01.htm$', item.link)
|
match = re.search('/([0-9a-zA-Z]{20,})/story01.htm$', item.link)
|
||||||
if match:
|
if match:
|
||||||
url = match.groups()[0].split('0')
|
url = match.groups()[0].split('0')
|
||||||
t = {'A':'0', 'B':'.', 'C':'/', 'D':'?', 'E':'-', 'I':'_', 'L':'http://', 'S':'www.', 'N':'.com', 'O':'.co.uk'}
|
t = {'A':'0', 'B':'.', 'C':'/', 'D':'?', 'E':'-', 'I':'_', 'L':'http://', 'S':'www.', 'N':'.com', 'O':'.co.uk'}
|
||||||
item.link = "".join([(t[s[0]] if s[0] in t else "=") + s[1:] for s in url[1:]])
|
item.link = "".join([(t[s[0]] if s[0] in t else "=") + s[1:] for s in url[1:]])
|
||||||
log(item.link)
|
log(item.link)
|
||||||
if '{http://rssnamespace.org/feedburner/ext/1.0}origLink' in item:
|
|
||||||
item.link = item['{http://rssnamespace.org/feedburner/ext/1.0}origLink']
|
|
||||||
log(item.link)
|
|
||||||
|
|
||||||
# check cache
|
# check cache
|
||||||
if item.link in cache:
|
if item.link in cache:
|
||||||
|
|
Loading…
Reference in New Issue