0

I am trying to open a password protected web-link with the default browser from my python script. I am aware of this post. But os.startfile(url) and webbrowser.open(url) only works for link without password as far as i tried.

And i am aware of urllib urllib2 and mechanize but i want it to open it in the browser so that the user can start using the password protected page without having to type in username and password again and again (password and username will be hardcoded in script)

Is there anyway to do this?

EDIT: FYI, i only need it for Window platform

Community
  • 1
  • 1
Chris Aung
  • 9,152
  • 33
  • 82
  • 127

1 Answers1

0

https://github.com/gabrielfalcao/bolacha

Reasonably sure this will help you.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
TheLastGIS
  • 426
  • 5
  • 18
  • Doesn't seem to support python 3x – Chris Aung Jun 18 '13 at 05:29
  • http://stackoverflow.com/questions/11343188/accessing-password-protected-url-from-python-script?rq=1 This could be the answer to your question. – TheLastGIS Jun 18 '13 at 05:37
  • Like i said in my question, I want the link to be opened in the default browser.. not with `urllib2` as i am not gonna process the data from the site. – Chris Aung Jun 18 '13 at 05:53
  • The answer tells you to use the "requests" library. It actually says that urllib2 is not what you want to use. – TheLastGIS Jun 18 '13 at 06:03
  • I think you misunderstood my question.Both `urllib2` and `requests` library will access the website and give me the data on the website to process in python .. What i want is to open it in default browser and automatically log in.. – Chris Aung Jun 18 '13 at 06:24
  • Ahhh I see...Good luck with that. – TheLastGIS Jun 18 '13 at 06:56