Hi, I'm also working in building a script to automatically download Freddie and Fannie data, the steps that we are using do not work anymore for Fannie I guess. It just downloads an XML file and nothing else.
I was using urllib.request.urlretrieve to fetch the data.
with requests.Session() as sess: print(" SUCCESS : Program Started Succesfully") sess.get(login_page_url) js_session_cookie = sess.cookies.get_dict() login_payload = { 'username': USERNAME, 'password': PASSWORD, 'cookie': js_session_cookie } response_login = sess.post(login_page_url, data=login_payload) download_page_payload = { 'accept': 'Yes', 'action': 'acceptTandC', 'acceptSubmit': 'Continue', 'cookie': js_session_cookie } response_download = sess.post( download_page_url, data=download_page_payload) print(" SUCCESS : Login into freddiemac.embs.com succesful ") urllib.request.urlretrieve('https://loanperformancedata.fanniemae.com/lppub/publish_aws?file=2018Q1.zip','test.zip')
The above code is in python and not working, neither do your steps, which are almost similar I believe.
So if you can rerun your script and if it is working please let me know. thanks in advance.