Skip to content

Commit

Permalink
Fix api call to get yesterday's data in fetch_solar_all (electricitym…
Browse files Browse the repository at this point in the history
  • Loading branch information
con-cat committed May 18, 2021
1 parent 5f8fce6 commit 60406ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parsers/lib/AU_solar.py
Expand Up @@ -69,8 +69,8 @@ def fetch_solar_all(session, hours_in_the_past=2):
# Requesting yesterday's data in the browser sometimes gives an HTTP 406 Unacceptable error,
# but it's always worked in the script so far. Could double check and adjust
# how many hours are fetched if it causes a problem in the future.
data_url = SOLAR_URL.format(date=_get_australian_date(days_in_past=1))
r = session.get(data_url)
data_url = SOLAR_URL
r = session.post(data_url, {'day': _get_australian_date(days_in_past=1)})
data = r.json()

full_production_data = data['output'] + production_data
Expand Down

0 comments on commit 60406ef

Please sign in to comment.