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

33 lines
1.0 KiB
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class Arbetaren_SE(BasicNewsRecipe):
title = u'Arbetaren'
__author__ = 'Joakim Lindskog'
description = 'Nyheter fr\xc3\xa5n Arbetaren'
publisher = 'Arbetaren'
category = 'news, politics, socialism, Sweden'
oldest_article = 7
delay = 1
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
encoding = 'utf-8'
language = 'sv'
conversion_options = {
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
}
keep_only_tags = [dict(name='div', attrs={'id': 'article'})]
remove_tags_before = dict(name='div', attrs={'id': 'article'})
remove_tags_after = dict(name='p', attrs={'id': 'byline'})
remove_tags = [
dict(name=['object', 'link', 'base']),
dict(name='p', attrs={'class': 'print'}),
dict(name='a', attrs={'class': 'addthis_button_compact'}),
dict(name='script')
]
feeds = [(u'Nyheter', u'http://www.arbetaren.se/rss/arbetaren.rss?rev=123')]