mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2ee2c64e9e
commit
47cee548dc
@ -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']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user