forked from kunsi/dotfiles
fix some bugs (#1)
* change base url of api requests because the cert for portal.imice.de expired some weeks ago * cast arguments of format_time() to int because it threw a type error ** there might be nicer solutions Co-authored-by: Von Birne <> Reviewed-on: kunsi/dotfiles#1 Co-authored-by: vonbirne <vonbirne@noreply.git.franzi.business> Co-committed-by: vonbirne <vonbirne@noreply.git.franzi.business>
This commit is contained in:
parent
27a5932bcc
commit
239d003192
1 changed files with 3 additions and 3 deletions
|
@ -33,11 +33,11 @@ try:
|
|||
|
||||
now = datetime.now()
|
||||
|
||||
trip_info_req = get('https://portal.imice.de/api1/rs/tripInfo/trip')
|
||||
trip_info_req = get('https://iceportal.de/api1/rs/tripInfo/trip')
|
||||
trip_info_req.raise_for_status()
|
||||
trip_info = trip_info_req.json()['trip']
|
||||
|
||||
ice_status_req = get('https://portal.imice.de/api1/rs/status')
|
||||
ice_status_req = get('https://iceportal.de/api1/rs/status')
|
||||
ice_status_req.raise_for_status()
|
||||
ice_status = ice_status_req.json()
|
||||
|
||||
|
@ -67,7 +67,7 @@ try:
|
|||
ice_status['speed'],
|
||||
next_stop,
|
||||
ice_status['connectivity']['currentState'],
|
||||
format_time(ice_status['connectivity']['remainingTimeSeconds']),
|
||||
format_time(int(ice_status['connectivity']['remainingTimeSeconds'])),
|
||||
ice_status['connectivity']['nextState'],
|
||||
))
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in a new issue