mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
Update Dawn
This commit is contained in:
parent
645cf5eff9
commit
5862e8057a
@ -1,6 +1,12 @@
|
|||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
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 DawnRecipe(BasicNewsRecipe):
|
class DawnRecipe(BasicNewsRecipe):
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__author__ = 'kwetal'
|
__author__ = 'kwetal'
|
||||||
@ -21,9 +27,8 @@ class DawnRecipe(BasicNewsRecipe):
|
|||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
dict(name='div', attrs={'class': 'push-half--sides push--top'}),
|
classes('template__header template__main')
|
||||||
dict(name='article', attrs={'class': 'story story--single push-half'})]
|
]
|
||||||
|
|
||||||
# Feeds from
|
# Feeds from
|
||||||
# http://www.dawn.com/wps/wcm/connect/dawn-content-library/dawn/services/rss
|
# http://www.dawn.com/wps/wcm/connect/dawn-content-library/dawn/services/rss
|
||||||
feeds = []
|
feeds = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user