calibre/recipes/tri_city_herald.recipe
Kovid Goyal 567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30

28 lines
943 B
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class TriCityHeraldRecipe(BasicNewsRecipe):
title = u'Tri-City Herald'
description = 'The Tri-City Herald Mid-Columbia.'
language = 'en'
__author__ = 'Laura Gjovaag'
oldest_article = 1.5
max_articles_per_feed = 100
no_stylesheets = True
remove_javascript = True
keep_only_tags = [
dict(name='div', attrs={'id': 'story_header'}),
dict(name='img', attrs={'class': 'imageCycle'}),
dict(name='div', attrs={'id': ['cycleImageCaption', 'story_body']})
]
remove_tags = [
dict(name='div', attrs={'id': 'story_mlt'}),
dict(name='a', attrs={'id': 'commentCount'}),
dict(name=['script', 'noscript', 'style'])]
extra_css = 'h1{font: bold 140%;} #cycleImageCaption{font: monospace 60%}'
feeds = [
(u'Tri-City Herald Mid-Columbia',
u'http://www.tri-cityherald.com/901/index.rss')
]