Skip to content

Commit

Permalink
fix: get namespace dynamically from entso-e response
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperiio committed Oct 4, 2024
1 parent 08d30cb commit a48ff07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def get_electricity_price(
raise Exception(f"Failed to fetch data from ENTSO-E API: {response.text}")

prices = []
namespace = {"ns": "urn:iec62325.351:tc57wg16:451-3:publicationdocument:7:0"}
root = ET.fromstring(response.text)
namespace = {'ns': root.tag.split('}')[0].strip('{')}

daily_prices = {}

Expand Down

0 comments on commit a48ff07

Please sign in to comment.