Python Requests Onclick

I've successfully logged into a website and loaded a table that can then be downloaded as an .xls file. The issue I'm having is that an image has to be clicked to call the download. I haven't figured out how to post the correct data to fetch the .xls file.

Here is the website's HTML:

 <table border="0" width ="95%" align ="center">
        <form name="downloadXLSForm" method="POST" action="/control/filedownload">
            <input type="hidden" name="fileType" value="mlInventory">
            <td align="left" valign = "top">
                <font face="Verdana, Arial, Helvetica, sans-serif" size="-2">
                    <input type="image" src="../images/excel_download.jpg" onClick="document.downloadXLSForm.submit()" value="Excel Download" Alt="Download the results above into MS Excel">
        <td align="right" valign = "top">
            <form name="mlInventorysearch" method="post" action="/control/mlinventorysearch">
                <input type="hidden" name="refreshSearch" value="true">
                <input type="submit" value="New Search">

There is a link embedded in the website that points to but when I try and get it, the page is empty.

Here is my code:

with requests.Session() as z:
    z.get("", stream=True)
    p3 ="",data=payload3) 
    inventory_start =, data={'newSearch':'true'})
    inventory_excel =,data={'fileType':'mlInventory'})
    #inventory_excel ='',data={'fileType':'mlInventory'})
    inventory_excel = z.get('', stream = True)
    #output = open('MLCStock.xls', 'wb')


I apologize for the redundant comments. I was trying various combinations to see what would take.

Thanks in advance. I am quite new at Python.