The form on that page is will actually be submitted by JavaScript, so just looking at the <form />
element is not (necessarily) enough. You can use e.g. Firebug's network tab or the Chrome developer tools to inspect the POST request after you submit the form in order to see what's actually submitted.
This seems to work:
import requests
url = 'https://fcq.colorado.edu/scripts/broker.exe'
payload = {
"_PROGRAM": "fcqlib.fcqdata.sas",
"_SERVICE": "fcq",
"camp": "BD",
"fileFrmt": "HTM",
"ftrm": "1",
"fyr": "2007",
"grp1": "ALL",
"jjj": "mytst",
"ltrm": "7",
"lyr": "2013",
"sort": "descending YEARTERM SUBJECT COURSE SECTION",
}
payload.update({
'subj': 'CSCI',
'crse': '1300',
})
def main():
r = requests.post(url, payload)
with open("requests_results.html", "w") as f:
f.write(r.content)
return 0
if __name__ == '__main__':
main()