mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Financial Express by DM
This commit is contained in:
parent
75a0ac806e
commit
32e296dd2d
BIN
resources/images/news/fe_india.png
Normal file
BIN
resources/images/news/fe_india.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 370 B |
46
resources/recipes/fe_india.recipe
Normal file
46
resources/recipes/fe_india.recipe
Normal file
@ -0,0 +1,46 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
financialexpress.com
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class FE_India(BasicNewsRecipe):
|
||||
title = 'The Financial Express'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Financial news from India'
|
||||
publisher = 'The Indian Express Limited'
|
||||
category = 'news, politics, finances, India'
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'cp1252'
|
||||
use_embedded_content = False
|
||||
language = 'en_IN'
|
||||
remove_empty_feeds = True
|
||||
masthead_url = 'http://static.expressindia.com/frontend/fe/images/fe_logo.jpg'
|
||||
publication_type = 'magazine'
|
||||
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } '
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
keep_only_tags = [dict(attrs={'class':'txt'})]
|
||||
remove_attributes = ['width','height']
|
||||
|
||||
feeds = [(u'Articles', u'http://www.expressindia.com/syndications/fe.xml')]
|
||||
|
||||
def print_version(self, url):
|
||||
article_raw = url.rpartition('/')[0]
|
||||
article_id = article_raw.rpartition('/')[2]
|
||||
return 'http://www.financialexpress.com/printer/news/' + article_id + '/'
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return soup
|
Loading…
x
Reference in New Issue
Block a user