#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __docformat__ = 'restructuredtext en' import re from calibre.web.feeds.news import BasicNewsRecipe class Tweakers(BasicNewsRecipe): title = u'Tweakers.net - with Reactions' __author__ = 'Roedi06' language = 'nl' oldest_article = 7 max_articles_per_feed = 100 cover_url = 'http://img51.imageshack.us/img51/7470/tweakersnetebook.gif' keep_only_tags = [dict(name='div', attrs={'class':'columnwrapper news'}), {'id':'reacties'}, ] remove_tags = [dict(name='div', attrs={'id' : ['utracker']}), {'id' : ['channelNav']}, {'id' : ['contentArea']}, {'class' : ['breadCrumb']}, {'class' : ['nextPrevious ellipsis']}, {'class' : ['advertorial']}, {'class' : ['sidebar']}, {'class' : ['filterBox']}, {'id' : ['toggleButtonTxt']}, {'id' : ['socialButtons']}, {'class' : ['button']}, {'class' : ['textadTop']}, {'class' : ['commentLink']}, {'title' : ['Reageer op deze reactie']}, {'class' : ['pageIndex']}, {'class' : ['reactieHeader collapsed']}, ] no_stylesheets=True preprocess_regexps = [ (re.compile(r'
', re.IGNORECASE | re.DOTALL), lambda match : ''), (re.compile(r'
', re.IGNORECASE | re.DOTALL), lambda match : ''), (re.compile(r'