calibre/recipes/oriental_daily.recipe
Kennyl 11ccd76b34 Add Cover Image
Add Cover Image using wikimedia file
2017-01-21 16:19:28 +08:00

48 lines
1.6 KiB
Plaintext

__license__ = 'GPL v3'
__copyright__ = '2010, Larry Chan <larry1chan at gmail.com>'
'''
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
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} ' # noqa
conversion_options = {
'comments': description, 'tags': category, 'language': language, 'publisher': publisher, 'linearize_tables': True
}
masthead_url = 'https://upload.wikimedia.org/wikipedia/commons/4/4f/Orisun.JPG'
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']
summary_length = 0
feeds = [(u'Oriental Daily', u'http://orientaldaily.on.cc/rss/news.xml')]