mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
New recipe for Business Standard by Darko Miletic
This commit is contained in:
parent
73801dd2ae
commit
05a14fbda6
BIN
resources/images/news/business_standard.png
Normal file
BIN
resources/images/news/business_standard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 290 B |
@ -58,7 +58,7 @@ recipe_modules = ['recipe_' + r for r in (
|
|||||||
'esquire', 'livemint', 'thedgesingapore', 'darknet', 'rga',
|
'esquire', 'livemint', 'thedgesingapore', 'darknet', 'rga',
|
||||||
'intelligencer', 'theoldfoodie', 'hln_be', 'honvedelem',
|
'intelligencer', 'theoldfoodie', 'hln_be', 'honvedelem',
|
||||||
'the_new_republic', 'philly', 'salon', 'tweakers', 'smashing',
|
'the_new_republic', 'philly', 'salon', 'tweakers', 'smashing',
|
||||||
'thestar',
|
'thestar', 'business_standard',
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|
||||||
|
57
src/calibre/web/feeds/recipes/recipe_business_standard.py
Normal file
57
src/calibre/web/feeds/recipes/recipe_business_standard.py
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
www.business-standard.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
|
|
||||||
|
class BusinessStandard(BasicNewsRecipe):
|
||||||
|
title = 'Business Standard'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = "India's most respected business daily"
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
encoding = 'cp1252'
|
||||||
|
publisher = 'Business Standard Limited'
|
||||||
|
category = 'news, business, money, india, world'
|
||||||
|
language = 'en_IN'
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comments' : description
|
||||||
|
,'tags' : category
|
||||||
|
,'language' : language
|
||||||
|
,'publisher' : publisher
|
||||||
|
,'linearize_tables': True
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_attributes=['style']
|
||||||
|
remove_tags = [dict(name=['object','link','script','iframe'])]
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'News Now' , u'http://feeds.business-standard.com/News-Now.xml' )
|
||||||
|
,(u'Banking & finance' , u'http://feeds.business-standard.com/Banking-Finance-All.xml' )
|
||||||
|
,(u'Companies & Industry', u'http://feeds.business-standard.com/Companies-Industry-All.xml')
|
||||||
|
,(u'Economy & Policy' , u'http://feeds.business-standard.com/Economy-Policy-All.xml' )
|
||||||
|
,(u'Tech World' , u'http://feeds.business-standard.com/Tech-World-All.xml' )
|
||||||
|
,(u'Life & Leisure' , u'http://feeds.business-standard.com/Life-Leisure-All.xml' )
|
||||||
|
,(u'Markets & Investing' , u'http://feeds.business-standard.com/Markets-Investing-All.xml' )
|
||||||
|
,(u'Management & Mktg' , u'http://feeds.business-standard.com/Management-Mktg-All.xml' )
|
||||||
|
,(u'Automobiles' , u'http://feeds.business-standard.com/Automobiles.xml' )
|
||||||
|
,(u'Aviation' , u'http://feeds.business-standard.com/Aviation.xml' )
|
||||||
|
]
|
||||||
|
|
||||||
|
def print_version(self, url):
|
||||||
|
autono = url.rpartition('autono=')[2]
|
||||||
|
tp = 'on'
|
||||||
|
hk = url.rpartition('bKeyFlag=')[1]
|
||||||
|
if hk == '':
|
||||||
|
tp = ''
|
||||||
|
return 'http://www.business-standard.com/india/printpage.php?autono=' + autono + '&tp=' + tp
|
||||||
|
|
||||||
|
def get_article_url(self, article):
|
||||||
|
return article.get('guid', None)
|
Loading…
x
Reference in New Issue
Block a user