mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 03:25:55 +01:00
Update Hot Air
This commit is contained in:
parent
c5f207f1e6
commit
43f8824acd
1 changed files with 11 additions and 2 deletions
|
|
@ -7,6 +7,12 @@
|
|||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
def classes(classes):
|
||||
q = frozenset(classes.split(' '))
|
||||
return dict(attrs={
|
||||
'class': lambda x: x and frozenset(x.split()).intersection(q)})
|
||||
|
||||
|
||||
class hotair(BasicNewsRecipe):
|
||||
title = u'Hot Air'
|
||||
__author__ = 'Walt Anthony'
|
||||
|
|
@ -25,9 +31,12 @@ class hotair(BasicNewsRecipe):
|
|||
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
|
||||
}
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'id': 'page-post'})]
|
||||
keep_only_tags = [
|
||||
dict(name='h1'),
|
||||
classes('byline article-image article-text'),
|
||||
]
|
||||
|
||||
remove_tags = [dict(name=['iframe', 'small', 'embed',
|
||||
remove_tags = [dict(name=['iframe', 'small', 'embed', 'button',
|
||||
'object', 'link', 'script', 'form'])]
|
||||
|
||||
feeds = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue