Don't thank me please as I haven't done anything. I know nothing about Python programming but decided to give it a shot. Hope the community can offer some help to me.
I am stuck on the login piece. I don't know what the login website is or the login form is for the economist or whether it exist.
This is what I have so far. Everything I tried did not work so far. If I can get this correct, maybe it can work.
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username and self.password:
br.open('https://myaccount.economist.com/s/login/')
br.select_form(id='c-lwc-login-form')
br['username'] = self.username
br['password'] = self.password
br.submit()
return br
|