Update Sueddeutsche Zeitung

This commit is contained in:
Kovid Goyal 2014-10-02 20:21:23 +05:30
parent 0f660259d3
commit 7aee5f537b

View File

@ -4,6 +4,8 @@ __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
''' '''
www.sueddeutsche.de/sz/ www.sueddeutsche.de/sz/
''' '''
# History
# 2014.10.02 Fixed url Problem lala-rob(web@lala-rob.de)
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
from calibre import strftime from calibre import strftime
@ -40,14 +42,21 @@ class SueddeutcheZeitung(BasicNewsRecipe):
remove_attributes = ['height','width','style'] remove_attributes = ['height','width','style']
def get_browser(self): def get_browser(self):
br = BasicNewsRecipe.get_browser(self) browser = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.INDEX) # Login via fetching of Streiflicht -> Fill out login request
br.select_form(name='lbox') #url = self.root_url + 'show.php?id=streif'
br['login_name' ] = self.username url = 'https://id.sueddeutsche.de/login'
br['login_passwort'] = self.password browser.open(url)
br.submit()
return br browser.select_form(nr=0) # to select the first form
browser['login'] = self.username
browser['password'] = self.password
browser.submit()
return browser
remove_tags =[ remove_tags =[
dict(attrs={'class':'hidePrint'}) dict(attrs={'class':'hidePrint'})