Fix #6302 (a change in the index-page broke the "Der Tagesspiegel"-recipe)

This commit is contained in:
Kovid Goyal 2010-07-27 08:21:40 -06:00
parent 7b1a065519
commit 8dbaaaa37b

View File

@ -26,7 +26,7 @@ class TagesspiegelRSS(BasicNewsRecipe):
.quote .cite{font-family:Georgia,Palatino,Palatino Linotype,FreeSerif,serif;font-size:xx-small} .quote .cite{font-family:Georgia,Palatino,Palatino Linotype,FreeSerif,serif;font-size:xx-small}
.hcf-inline-left{float:left;margin-right:15px;position:relative;} .hcf-inline-left{float:left;margin-right:15px;position:relative;}
.hcf-inline-right{float:right;margin-right:15px;position:relative;} .hcf-inline-right{float:right;margin-right:15px;position:relative;}
.hcf-smart-box{font-family: Arial, Helvetica, sans-serif; font-size: xx-small; margin: 0px 15px 8px 0px; width: 300px;} .hcf-smart-box{font-family: Arial, Helvetica, sans-serif; font-size: xx-small; margin: 0px 15px 8px 0px; width: 300px;}
''' '''
no_stylesheets = True no_stylesheets = True
@ -40,7 +40,7 @@ class TagesspiegelRSS(BasicNewsRecipe):
dict(name='div', attrs={'class':["hcf-jump-to-comments","hcf-clear","hcf-magnify hcf-media-control"] }), dict(name='div', attrs={'class':["hcf-jump-to-comments","hcf-clear","hcf-magnify hcf-media-control"] }),
dict(name='span', attrs={'class':["hcf-mainsearch",] }), dict(name='span', attrs={'class':["hcf-mainsearch",] }),
dict(name='ul', attrs={'class':["hcf-tools"]}), dict(name='ul', attrs={'class':["hcf-tools"]}),
dict(name='ul', attrs={'class': re.compile('hcf-services')}) dict(name='ul', attrs={'class': re.compile('hcf-services')})
] ]
def parse_index(self): def parse_index(self):
@ -58,9 +58,9 @@ class TagesspiegelRSS(BasicNewsRecipe):
if div['class'] == 'hcf-header': if div['class'] == 'hcf-header':
try: try:
key = string.capwords(feed_title(div.em.a)) key = string.capwords(feed_title(div.em.a))
articles[key] = [] articles[key] = []
ans.append(key) ans.append(key)
except: except:
continue continue
@ -88,5 +88,3 @@ class TagesspiegelRSS(BasicNewsRecipe):
ans = [(key, articles[key]) for key in ans if articles.has_key(key)] ans = [(key, articles[key]) for key in ans if articles.has_key(key)]
return ans return ans