From 32e296dd2dd2fe20a021b792bed3580402e6285f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 12 Aug 2010 13:17:48 -0600 Subject: [PATCH] Financial Express by DM --- resources/images/news/fe_india.png | Bin 0 -> 370 bytes resources/recipes/fe_india.recipe | 46 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 resources/images/news/fe_india.png create mode 100644 resources/recipes/fe_india.recipe diff --git a/resources/images/news/fe_india.png b/resources/images/news/fe_india.png new file mode 100644 index 0000000000000000000000000000000000000000..759f2594cd44a36bbe353b7116f11b45cdabd411 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*VRoY|f(jv*GOdxH-O9#G)mUYC-dq+WJu=9|N} zl$6ZM?YImD7G|h-w7hKLxXyY-DoEfI^WP_TqBQM}_CB-W?sBH1Orc6mTme6)7-rxVsncbnGk%Z}w1U_2w;Xs^`2HP7)#{374m!8Nlu zKU*KtH?zuCqqdpi#9@|YOU{_%dr4ju;cUC%bhwR1f=2y~`uiEBhjN@7W> zRdP`(kYX@0Ff`CLu+TL$3NbXcGBmR?HqkXOvobIcs}xK@(U6;;l9^VCqQTV4$k58r W2%=#wm!%a@1B0ilpUXO@geCw{iF)(^ literal 0 HcmV?d00001 diff --git a/resources/recipes/fe_india.recipe b/resources/recipes/fe_india.recipe new file mode 100644 index 0000000000..7b5f380bdf --- /dev/null +++ b/resources/recipes/fe_india.recipe @@ -0,0 +1,46 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +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