From 75d55a38a081874c1864ce7413451bf3ba33661a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Sep 2010 09:43:53 -0600 Subject: [PATCH] Oriental Daily by Larry Chan --- resources/recipes/oriental_daily.recipe | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 resources/recipes/oriental_daily.recipe diff --git a/resources/recipes/oriental_daily.recipe b/resources/recipes/oriental_daily.recipe new file mode 100644 index 0000000000..e8048edcc5 --- /dev/null +++ b/resources/recipes/oriental_daily.recipe @@ -0,0 +1,50 @@ + +__license__ = 'GPL v3' +__copyright__ = '2010, Larry Chan ' +''' +oriental daily +''' +from calibre.web.feeds.recipes import BasicNewsRecipe + +class OrientalDaily(BasicNewsRecipe): + title = 'Oriental Dailly' + __author__ = 'Larry Chan' + description = 'News from HK' + oldest_article = 2 + max_articles_per_feed = 100 + simultaneous_downloads = 5 + no_stylesheets = True + #delay = 1 + use_embedded_content = False + encoding = 'utf8' + publisher = 'Oriental Daily' + category = 'news, HK, world' + language = 'zh' + publication_type = 'newsportal' + extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} ' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + ,'linearize_tables': True + } + + remove_tags_after = dict(id='bottomNavCTN') + + keep_only_tags = [ + dict(name='div', attrs={'id':['leadin', 'contentCTN-right']}) + + ] + + remove_tags = [ + dict(name='div', attrs={'class':['largeAdsCTN', 'contentCTN-left', 'textAdsCTN', 'footerAds clear']}), + dict(name='div', attrs={'id':['articleNav']}) + + ] + + remove_attributes = ['width','height','href'] + + + feeds = [(u'Oriental Daily', u'http://orientaldaily.on.cc/rss/news.xml')]