View Single Post
Old 10-22-2013, 03:12 PM   #1
lucis_lupinum
Member
lucis_lupinum began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2013
Device: Kindle
Login subscription 'Aachener Zeitung'

Hi!

I am currently trying to create a recipe for our local newspaper and I want to include a login to download all of the content (some of the articles are only fully viewable with a valid login.

So I tried to use the method for this login which I found in several forums, but I can't figure out how to use it properly

On the main page (Aachener Zeitung) there are two possibilities to log in.
You can either click the button on the top right or you can use the bottom bar.

I didn't find out how to adress one of these properly, so I tried another login page. On the mobile site AZ mobile the login fields are better visible and I tried to access them with the following code:

Spoiler:
Code:
def get_browser(self):
        br = BasicNewsRecipe.get_browser(self)
        if self.username is not None and self.password is not None:
            br.open('http://www.aachener-zeitung.de/mobile/extern/sso-templates/registrieren')
            br.select_form(nr=0)
            br['login_loginname'] = self.username
            br['login_password'] = self.password
            br.submit()
        return br


It seems to work, but it shows no effect. There are no errors, but the articles are still not visible in the downloaded content.

So maybe somebody can tell me what I have to correct in my code? Or what I have to do to use the 'normal' forms on the regular webpage?

lucis_lupinum is offline   Reply With Quote