Update Le Devoir

Fixes #1772549 [Le Devoir plugin broken -- again](https://bugs.launchpad.net/calibre/+bug/1772549)
This commit is contained in:
Kovid Goyal 2018-05-22 09:09:18 +05:30
parent c9488bd1b1
commit 94058dd07b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -12,6 +12,12 @@ http://www.ledevoir.com/
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 ledevoir(BasicNewsRecipe):
author = 'Lorenzo Vigentini'
description = 'Canadian Paper. A subscription is optional, with it you get more content'
@ -40,7 +46,10 @@ class ledevoir(BasicNewsRecipe):
keep_only_tags = [
dict(name='h1'),
dict(attrs={'class': 'col-xs-14 col-sm-8 col-md-10'}),
dict(attrs={'class': 'col-xs-14 col-sm-7 col-md-9 col-lg-10'}),
]
remove_tags = [
classes('category-nav social')
]
feeds = [