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

45 lines
1.3 KiB
Python

#!/usr/bin/env python2
__license__ = 'GPL v3'
__copyright__ = '2010 Starson17'
'''
fudzilla.com
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
class Fudzilla(BasicNewsRecipe):
title = u'Fudzilla'
__author__ = 'Starson17'
language = 'en'
description = 'Tech news'
oldest_article = 7
remove_javascript = True
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
remove_tags_before = dict(name='div', attrs={'class': ['padding']})
remove_tags = [dict(name='td', attrs={'class': ['left', 'right']}),
dict(name='div', attrs={'id': ['toolbar', 'buttons']}),
dict(name='div', attrs={
'class': ['artbannersxtd', 'back_button']}),
dict(name='span', attrs={'class': ['pathway']}),
dict(name='th', attrs={
'class': ['pagenav_next', 'pagenav_prev']}),
dict(name='table', attrs={'class': ['headlines']}),
]
feeds = [
(u'Posts', u'http://www.fudzilla.com/?format=feed')
]
preprocess_regexps = [
(re.compile(r'<p class="MsoNormal"> Welcome.*</p> ',
re.DOTALL | re.IGNORECASE), lambda match: '')
]