Wish to logon to web site to programmatically download data.
Looking for assistance with Python and the urllib2 module.
At this page:
there is a Logon button which uses a GET (not a Post) referring to:
which Redirects to: https://www.nifc.blm.gov/cgi/WfmiHome.cgi/Page/DoiMonitor
I'm hoping to understand how to navigate through web pages to eventually logon with my account.
I've tried many variations of the below code without success.
Need help understand urllib2 to navigate to page with "I Agree" button and then to the actual page to enter username and password.
cj = cookielib.CookieJar()
opener = urllib2.build_opener(
#### First page
url = 'https://www.nifc.blm.gov/cgi/WfmiHome.cgi'
request = urllib2.Request(url)
response = urllib2.urlopen(request)
html = response.read()
# Print to screen
Appreciate help ... Thanks !