Fix #1079130 (Updated recipe for Business standard)

This commit is contained in:
Kovid Goyal 2012-11-18 09:00:30 +05:30
parent 910c1a17e7
commit d660f7f025
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>' __copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
''' '''
www.business-standard.com www.business-standard.com
''' '''
@ -14,10 +14,12 @@ class BusinessStandard(BasicNewsRecipe):
max_articles_per_feed = 100 max_articles_per_feed = 100
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False
auto_cleanup = False
encoding = 'cp1252' encoding = 'cp1252'
publisher = 'Business Standard Limited' publisher = 'Business Standard Limited'
category = 'news, business, money, india, world' category = 'news, business, money, india, world'
language = 'en_IN' language = 'en_IN'
masthead_url = 'http://feeds.business-standard.com/images/logo_08.jpg'
conversion_options = { conversion_options = {
'comments' : description 'comments' : description
@ -26,7 +28,7 @@ class BusinessStandard(BasicNewsRecipe):
,'publisher' : publisher ,'publisher' : publisher
,'linearize_tables': True ,'linearize_tables': True
} }
keep_only_tags=[dict(attrs={'class':'TableClas'})] #keep_only_tags=[dict(name='td', attrs={'class':'TableClas'})]
remove_tags = [ remove_tags = [
dict(name=['object','link','script','iframe','base','meta']) dict(name=['object','link','script','iframe','base','meta'])
,dict(attrs={'class':'rightDiv2'}) ,dict(attrs={'class':'rightDiv2'})
@ -45,3 +47,8 @@ class BusinessStandard(BasicNewsRecipe):
,(u'Management & Mktg' , u'http://feeds.business-standard.com/rss/7_0.xml' ) ,(u'Management & Mktg' , u'http://feeds.business-standard.com/rss/7_0.xml' )
,(u'Opinion' , u'http://feeds.business-standard.com/rss/5_0.xml' ) ,(u'Opinion' , u'http://feeds.business-standard.com/rss/5_0.xml' )
] ]
def print_version(self, url):
l, s, tp = url.rpartition('/')
t, k, autono = l.rpartition('/')
return 'http://www.business-standard.com/india/printpage.php?autono=' + autono + '&tp=' + tp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 786 B