Fix #5749 (SMH news feed broken)

This commit is contained in:
Kovid Goyal 2010-06-10 10:42:07 -06:00
parent a42985c57c
commit 624dfff639
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ class Smh_au(BasicNewsRecipe):
language = 'en_AU'
remove_empty_feeds = True
masthead_url = 'http://images.smh.com.au/2010/02/02/1087188/smh-620.jpg'
publication_type = 'newspaper'
publication_type = 'newspaper'
extra_css = ' h1{font-family: Georgia,"Times New Roman",Times,serif } body{font-family: Arial,Helvetica,sans-serif} .cT-imageLandscape{font-size: x-small} '
conversion_options = {
@ -47,7 +47,7 @@ class Smh_au(BasicNewsRecipe):
for itimg in soup.findAll('img',src=True):
if itimg['src'].endswith('frontpage.jpg'):
self.cover_url = itimg['src']
for item in soup.findAll(attrs={'class':'cN-storyHeadlineLead cfix'}):
description = ''
title_prefix = ''
@ -65,4 +65,4 @@ class Smh_au(BasicNewsRecipe):
,'url' :url
,'description':description
})
return [(soup.head.title.string, articles)]
return [(self.tag_to_string(soup.find('title')), articles)]

View File

@ -137,7 +137,7 @@ class Feed(object):
def populate_from_preparsed_feed(self, title, articles, oldest_article=7,
max_articles_per_feed=100):
self.title = title if title else _('Unknown feed')
self.title = unicode(title if title else _('Unknown feed'))
self.description = ''
self.image_url = None
self.articles = []