From b581b47ff1ca74167ef15b20cecb54bf3e6b66ea Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Nov 2011 18:27:19 +0530 Subject: [PATCH] Fix Die Zeit subscription version --- recipes/zeitde_sub.recipe | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/recipes/zeitde_sub.recipe b/recipes/zeitde_sub.recipe index 25fe0f5b23..583e86e7ac 100644 --- a/recipes/zeitde_sub.recipe +++ b/recipes/zeitde_sub.recipe @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: utf-8 mode: python -*- __license__ = 'GPL v3' @@ -123,6 +123,9 @@ class ZeitEPUBAbo(BasicNewsRecipe): # new login process response = browser.open(url) + # Get rid of nested form + response.set_data(response.get_data().replace('
', '')) + browser.set_response(response) browser.select_form(nr=2) browser.form['name']=self.username browser.form['pass']=self.password @@ -178,7 +181,11 @@ class ZeitEPUBAbo(BasicNewsRecipe): browser = self.get_browser() # new login process - browser.open(url) + response=browser.open(url) + # Get rid of nested form + response.set_data(response.get_data().replace('
', '')) + browser.set_response(response) + browser.select_form(nr=2) browser.form['name']=self.username browser.form['pass']=self.password @@ -211,4 +218,3 @@ class ZeitEPUBAbo(BasicNewsRecipe): self.log.warning('Using static old low-res cover') cover_url = 'http://images.zeit.de/bilder/titelseiten_zeit/1946/001_001.jpg' return cover_url -