2

I am trying to submit data to a form in a webpage. But the form is actually in a re-directed page from the main/ login page. How do i go the redirected page using python. I am using requests, I could not use browser as I was getting SSL certificate error while login authentication to this page.

Page code:

   <!--- Content Frame --->
   <iframe id="contentFrame"  name="contentFrame" src="/action/timesheet.action?     action=TimesheetRedirectAction" scrolling="auto" frameBorder="0"></iframe>

    <!--- WFM jQuery code --->

my code:

import requests
from requests.auth import HTTPBasicAuth
from bs4 import BeautifulSoup

website = 'https://qtime.qualcomm.com/login.jsp'
r = requests.get(website, auth=('username', 'password'),verify=False)

if r.status_code == 200:
     print "Login successful"

print r.content
print r.url
  • You can tell the browser to accept an untrusted certificate through `selenium`, see [How to deal with certificates using selenium?](http://stackoverflow.com/questions/24507078/how-to-deal-with-certificates-using-selenium) – alecxe Oct 15 '14 at 18:05

0 Answers0