Skip to content

Commit

Permalink
fix: remove html entities from url given that now produce error 500 o…
Browse files Browse the repository at this point in the history
…n omie.es (#18)
  • Loading branch information
polmonso authored Dec 23, 2024
1 parent 46c0446 commit ff2db35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions datasources/omie/omie_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_historical_hour_price(engine, verbose=2, dry_run=False):

filetype = 'marginalpdbc'
hist_files = get_file_list(filetype)
file_base_url = f'https://www.omie.es/es/file-download?parents%5B0%5D={filetype}&filename='
file_base_url = f'https://www.omie.es/es/file-download?parents={filetype}&filename='

total = len(hist_files['Nombre'])

Expand Down Expand Up @@ -92,7 +92,7 @@ def update_latest_hour_price(engine, verbose=2, dry_run=False):

filetype = 'marginalpdbc'
hist_files = get_file_list(filetype)
file_base_url = f'https://www.omie.es/es/file-download?parents%5B0%5D={filetype}&filename='
file_base_url = f'https://www.omie.es/es/file-download?parents={filetype}&filename='

file_name = hist_files['Nombre'][0]
pathfile = file_base_url + file_name
Expand Down Expand Up @@ -124,7 +124,7 @@ def update_historical_hour_price(engine, verbose=2, dry_run=False):

filetype = 'marginalpdbc'
hist_files = get_file_list(filetype)
file_base_url = f'https://www.omie.es/es/file-download?parents%5B0%5D={filetype}&filename='
file_base_url = f'https://www.omie.es/es/file-download?parents={filetype}&filename='

file_name = hist_files['Nombre'][0]
pathfile = file_base_url + file_name
Expand Down Expand Up @@ -193,7 +193,7 @@ def update_energy_buy_fromweb(engine, verbose=2, dry_run=False):

filetype = 'pdbc'
hist_files = get_file_list(filetype)
file_base_url = f'https://www.omie.es/es/file-download?parents%5B0%5D={filetype}&filename='
file_base_url = f'https://www.omie.es/es/file-download?parents={filetype}&filename='

file_name = hist_files['Nombre'][0]

Expand Down
2 changes: 1 addition & 1 deletion datasources/omie/omie_update_last_hour_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_files(engine, filetype, potential_missing):
print(f'No {filetype} new files available.')
exit()

base_url = f'https://www.omie.es/es/file-download?parents%5B0%5D={filetype}&filename='
base_url = f'https://www.omie.es/es/file-download?parents={filetype}&filename='

try:
dfs = [
Expand Down

0 comments on commit ff2db35

Please sign in to comment.