diff --git a/src/nemosis/data_fetch_methods.py b/src/nemosis/data_fetch_methods.py index 0aeb6f9..5ed1c62 100644 --- a/src/nemosis/data_fetch_methods.py +++ b/src/nemosis/data_fetch_methods.py @@ -446,8 +446,7 @@ def _finalise_csv_data(data, table_name): static_downloader_map = { "VARIABLES_FCAS_4_SECOND": _downloader.download_csv, "ELEMENTS_FCAS_4_SECOND": _downloader.download_elements_file, - "Generators and Scheduled Loads": _downloader.download_xl, - "_downloader.download_xl": _downloader.download_xl, + "Generators and Scheduled Loads": _downloader.download_xlsx, } static_file_reader_map = { diff --git a/src/nemosis/defaults.py b/src/nemosis/defaults.py index 9c199b2..1027ae1 100644 --- a/src/nemosis/defaults.py +++ b/src/nemosis/defaults.py @@ -134,7 +134,6 @@ "ELEMENTS_FCAS_4_SECOND": "https://www.nemweb.com.au/Reports/Current/Causer_Pays_Elements/", "VARIABLES_FCAS_4_SECOND": "https://aemo.com.au/-/media/files/electricity/nem/settlements_and_payments/settlements/auction-reports/archive/ancillary-services-market-causer-pays-variables-file.csv", "Generators and Scheduled Loads": "https://www.aemo.com.au/-/media/files/electricity/nem/Participant_Information/NEM-Registration-and-Exemption-List.xlsx", - "_downloader.download_xl": "https://www.aemo.com.au/-/media/files/electricity/nem/Participant_Information/NEM-Registration-and-Exemption-List.xlsx", } aemo_mms_url = "http://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/{}/MMSDM_{}_{}/MMSDM_Historical_Data_SQLLoader/DATA/{}.zip" diff --git a/src/nemosis/downloader.py b/src/nemosis/downloader.py index dac391c..4137cc3 100644 --- a/src/nemosis/downloader.py +++ b/src/nemosis/downloader.py @@ -280,10 +280,10 @@ def download_elements_file(url, path_and_name): f.write(r.content) -def download_xl(url, path_and_name): +def download_xlsx(url, path_and_name): """ - This function downloads a zipped csv using a url, extracts the csv and - saves it a specified location + Download an Excel (.xlsx) file from a URL and save it to the + specified path. Used for AEMO's NEM Registration and Exemption List. """ r = requests.get(url, headers=USR_AGENT_HEADER) with open(path_and_name, "wb") as f: