I'm trying to use python to submit this webform. But this is above my basic python skills and I can't seem to figure out why I'm just getting the original html returned me.
If you submit that form by hand using the parameters I have in my code below, you'll see that the following page contains the words "Results You do not exceed Notice Criteria." When I run the code below though, the output .txt file doesn't contain any of that statement in the html. What am I missing? Thanks
import requests url = r'https://oeaaa.faa.gov/oeaaa/external/gisTools/gisAction.jsp?'\ 'action=showNoNoticeRequiredToolForm' payload = { 'latD': 13, 'latM': 13, 'latS': 13, 'longD': 90, 'longM': 13, 'longS': 13, 'latDir': 'N', 'longDir': 'W', 'datum': 'NAD83', 'siteElevation': 1300, 'unadjustedAgl': 13, 'traverseway': 'NO', 'onAirport': 'false' } r = requests.post(url, data=payload) with open("results.txt", "w") as f: f.write(r.content)
url = r'https://oeaaa.faa.gov/oeaaa/external/gisTools/gisAction.jsp'