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

31 lines
1.4 KiB
Plaintext

import re
from calibre.web.feeds.news import BasicNewsRecipe
class Overclock_pl(BasicNewsRecipe):
title = u'Overclock.pl'
oldest_article = 7
max_articles_per_feed = 100
__author__ = 'fenuks'
description = u'Vortal poświęcony tematyce hardware, kładący największy nacisk na podkręcanie / overclocking (włącznie z extreme) i chłodzenie / cooling (air cooling, water cooling, freon cooling, dry ice, liquid nitrogen).' # noqa
category = 'IT'
language = 'pl'
masthead_url = 'http://www.overclock.pl/gfx/logo_m.png'
cover_url = 'http://www.overclock.pl/gfx/logo_m.png'
no_stylesheets = True
remove_empty_feeds = True
preprocess_regexps = [(re.compile(ur'<b>Komentarze do aktualności:.*?</a>', re.DOTALL),
lambda match: ''), (re.compile(ur'<h3>Nawigacja</h3>', re.DOTALL), lambda match: '')]
keep_only_tags = [
dict(name='div', attrs={'class': 'news'}), dict(id='articleContent')]
remove_tags = [dict(name='span', attrs={'class': 'info'}), dict(
attrs={'class': 'shareit'})]
feeds = [(u'Aktualno\u015bci', u'http://www.overclock.pl/rss.news.xml'),
(u'Testy i recenzje', u'http://www.overclock.pl/rss.articles.xml')]
def print_version(self, url):
if 'articles/show' in url:
return url.replace('show', 'showall')
else:
return url