calibre/recipes/london_free_press.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

40 lines
1.3 KiB
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class LondonFreePress(BasicNewsRecipe):
title = u'London Free Press'
__author__ = 'rty'
oldest_article = 4
max_articles_per_feed = 100
pubisher = 'lfpress.com'
description = 'Ontario Canada Newspaper'
category = 'News, Ontario, Canada'
remove_javascript = True
use_embedded_content = False
no_stylesheets = True
language = 'en_CA'
encoding = 'utf-8'
conversion_options = {'linearize_tables': True}
feeds = [
(u'News', u'http://www.lfpress.com/news/rss.xml'),
(u'Comment', u'http://www.lfpress.com/comment/rss.xml'),
(u'Entertainment', u'http://www.lfpress.com/entertainment/rss.xml '),
(u'Money', u'http://www.lfpress.com/money/rss.xml '),
(u'Life', u'http://www.lfpress.com/life/rss.xml '),
(u'Sports', u'http://www.lfpress.com/sports/rss.xml ')
]
keep_only_tags = [
dict(name='div', attrs={'id': 'article'}),
]
remove_tags = [
dict(name='div', attrs={'id': 'commentsBottom'}),
dict(name='div', attrs={'class': ['leftBox', 'bottomBox clear']}),
dict(name='ul', attrs={'class': 'tabs dl contentSwap'}),
]
remove_tags_after = [
dict(name='div', attrs={'class': 'bottomBox clear'}),
]