mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update tweakers.net
This commit is contained in:
parent
6dcd09d54c
commit
6385a90b1b
@ -2,16 +2,15 @@
|
|||||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
|
__docformat__ = 'restructuredtext en'
|
||||||
''' Changelog
|
''' Changelog
|
||||||
2012-04-27 DrMerry:
|
2012-04-27 DrMerry:
|
||||||
Added cover picture
|
Added cover picture
|
||||||
removed some extra tags
|
removed some extra tags
|
||||||
'''
|
'''
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
|
||||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
|
||||||
__docformat__ = 'restructuredtext en'
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
@ -24,12 +23,22 @@ class Tweakers(BasicNewsRecipe):
|
|||||||
max_articles_per_feed = 40
|
max_articles_per_feed = 40
|
||||||
cover_url = 'http://tweakers.net/ext/launch/g/logo.gif'
|
cover_url = 'http://tweakers.net/ext/launch/g/logo.gif'
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'class': 'columnwrapper news'})]
|
keep_only_tags = [
|
||||||
|
dict(name='div', attrs={'class': 'columnwrapper news'}),
|
||||||
|
dict(name='div', attrs={'class': 'article'})
|
||||||
|
]
|
||||||
|
|
||||||
remove_tags = [dict(name='div', attrs={'class': 'reacties'}),
|
remove_tags = [
|
||||||
{'id': ['utracker', 'socialButtons', 'b_ac']},
|
dict(name='div', attrs={'class': 'reacties'}),
|
||||||
{'class': ['sidebar', 'advertorial']},
|
{
|
||||||
{'class': re.compile('nextPrevious')},
|
'id': ['utracker', 'socialButtons', 'b_ac']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'class': ['sidebar', 'advertorial']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'class': re.compile('nextPrevious')
|
||||||
|
},
|
||||||
]
|
]
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
filter_regexps = [r'ads\.doubleclick\.net', r'ad\.doubleclick\.net']
|
filter_regexps = [r'ads\.doubleclick\.net', r'ad\.doubleclick\.net']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user