Update LeMonde

Merge branch 'lemonde-oct2021' of https://github.com/aimylios/calibre
This commit is contained in:
Kovid Goyal 2021-10-30 14:48:41 +05:30
commit b0089fe42c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 6 deletions

View File

@ -62,6 +62,7 @@ class LeMonde(BasicNewsRecipe):
remove_tags = [
classes('article__status meta__date meta__reading-time meta__social multimedia-embed'),
dict(name=['footer', 'link']),
dict(name='img', attrs={'class': ['article__author-picture']}),
dict(name='section', attrs={'class': ['article__reactions', 'author', 'catcher',
'portfolio', 'services-inread']})
]
@ -93,9 +94,9 @@ class LeMonde(BasicNewsRecipe):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://secure.lemonde.fr/sfuser/connexion')
br.select_form(name='connection')
br['connection[mail]'] = self.username
br['connection[password]'] = self.password
br.select_form(nr=0)
br['email'] = self.username
br['password'] = self.password
br.submit()
return br

View File

@ -60,6 +60,7 @@ class LeMondeNumerique(BasicNewsRecipe):
remove_tags = [
classes('article__status meta__date meta__reading-time meta__social multimedia-embed'),
dict(name=['footer', 'link']),
dict(name='img', attrs={'class': ['article__author-picture']}),
dict(name='section', attrs={'class': ['article__reactions', 'author', 'catcher',
'portfolio', 'services-inread']})
]
@ -90,9 +91,9 @@ class LeMondeNumerique(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
br.open('https://secure.lemonde.fr/sfuser/connexion')
br.select_form(name='connection')
br['connection[mail]'] = self.username
br['connection[password]'] = self.password
br.select_form(nr=0)
br['email'] = self.username
br['password'] = self.password
br.submit()
return br