This commit is contained in:
Kovid Goyal 2010-04-07 08:00:52 +05:30
parent 2ee2c64e9e
commit 47cee548dc

View File

@ -5,6 +5,7 @@ smh.com.au
''' '''
from calibre import strftime from calibre import strftime
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
class Smh_au(BasicNewsRecipe): class Smh_au(BasicNewsRecipe):
title = 'The Sydney Morning Herald - Printed edition' title = 'The Sydney Morning Herald - Printed edition'
@ -41,7 +42,8 @@ class Smh_au(BasicNewsRecipe):
def parse_index(self): def parse_index(self):
articles = [] articles = []
soup = self.index_to_soup('http://www.smh.com.au/todays-paper') rawc = self.index_to_soup('http://www.smh.com.au/todays-paper',True)
soup = BeautifulSoup(rawc,fromEncoding=self.encoding)
for itimg in soup.findAll('img',src=True): for itimg in soup.findAll('img',src=True):
if itimg['src'].endswith('frontpage.jpg'): if itimg['src'].endswith('frontpage.jpg'):
self.cover_url = itimg['src'] self.cover_url = itimg['src']