View Single Post
Old 04-23-2024, 01:30 PM   #5
hongho71
Enthusiast
hongho71 began at the beginning.
 
Posts: 40
Karma: 16
Join Date: Feb 2015
Device: Kindle Paperwhite
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
hongho71 is offline   Reply With Quote