mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ledevior add support for an optional subscription
This commit is contained in:
parent
3271528452
commit
6956a5ec70
@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
__license__ = 'GPL v3'
|
||||
__author__ = 'Lorenzo Vigentini'
|
||||
__copyright__ = '2009, Lorenzo Vigentini <l.vigentini at gmail.com>'
|
||||
@ -14,7 +13,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class ledevoir(BasicNewsRecipe):
|
||||
author = 'Lorenzo Vigentini'
|
||||
description = 'Canadian Paper'
|
||||
description = 'Canadian Paper. A subscription is optional, with it you get more content'
|
||||
|
||||
cover_url = 'http://www.ledevoir.com/images/ul/graphiques/logo_devoir.gif'
|
||||
title = u'Le Devoir'
|
||||
@ -28,6 +27,7 @@ class ledevoir(BasicNewsRecipe):
|
||||
max_articles_per_feed = 50
|
||||
use_embedded_content = False
|
||||
recursion = 10
|
||||
needs_subscription = 'optional'
|
||||
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
@ -77,3 +77,12 @@ class ledevoir(BasicNewsRecipe):
|
||||
.credit {color:#787878;font-size:0.71em;line-height:1.1em;font-weight:bold;}
|
||||
.texte {font-size:1.15em;line-height:1.4em;margin-bottom:17px;}
|
||||
'''
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://www.ledevoir.com')
|
||||
br.select_form(nr=1)
|
||||
br['login[courriel]'] = self.username
|
||||
br['login[password]'] = self.password
|
||||
br.submit()
|
||||
return br
|
||||
|
Loading…
x
Reference in New Issue
Block a user