Update NZZ Online

This commit is contained in:
Kovid Goyal 2013-04-25 00:43:44 +05:30
parent 7552e35b6b
commit a887ee24be

View File

@ -42,7 +42,6 @@ class Nzz(BasicNewsRecipe):
soup = self.index_to_soup(baseref)
articles = {}
key = None
ans = []
issuelist = soup.find(id="issueSelectorList")
@ -52,7 +51,6 @@ class Nzz(BasicNewsRecipe):
section = f.string
sectionref = baseref + f['href']
# print "section is "+section +" and ref is "+sectionref
ans.append(section)
articlesoup = self.index_to_soup(sectionref)
@ -68,7 +66,6 @@ class Nzz(BasicNewsRecipe):
pubdate = strftime('%a, %d %b')
if not artcaption is None:
# print " found article named "+artcaption+" at "+arthref
if not articles.has_key(section):
articles[section] = []
articles[section].append(
@ -80,10 +77,10 @@ class Nzz(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://webpaper.nzz.ch/login')
br.open('https://cas.nzz.ch/cas/login')
br.select_form(nr=0)
br['_username'] = self.username
br['_password'] = self.password
br['username'] = self.username
br['password'] = self.password
br.submit()
return br