From 77e6222ea3dd21d521bafc6761167b15d32934c7 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Fri, 7 Apr 2023 19:46:23 -0600 Subject: fix seattle --- dev/seattle/convert.py | 10 +++++++--- dist/seattle/index.html | 2 +- dist/seattle/sources.js | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dev/seattle/convert.py b/dev/seattle/convert.py index f7cbcd6..7efd4ad 100644 --- a/dev/seattle/convert.py +++ b/dev/seattle/convert.py @@ -2,8 +2,12 @@ import requests import json from pprint import pprint -r = requests.get('https://web6.seattle.gov/Travelers/api/Map/Data?zoomId=14&type=2') -points = r.json()['Features'] +# for some reason, the damn thing doesn't work +# r = requests.get('https://web.seattle.gov/Travelers/api/Map/Data?zoomId=14&type=2') +# points = r.json()['Features'] + +with open("raw.json", "r") as f: + points = json.load(f)['Features'] sources = [] for point in points: @@ -15,7 +19,7 @@ for point in points: result = {'id': cam_id, 'name': name} if cam['Type'] == 'sdot': stream = cam['ImageUrl'].replace('.jpg', '.stream') - stream_url = "https://58cc2dce193dd.streamlock.net:443/live/{stream}/playlist.m3u8".format(stream=stream) + stream_url = "https://61e0c5d388c2e.streamlock.net:443/live/{stream}/playlist.m3u8".format(stream=stream) result['stream'] = stream_url elif cam['Type'] == 'wsdot': url = 'https://images.wsdot.wa.gov/nw/' + cam['ImageUrl'] diff --git a/dist/seattle/index.html b/dist/seattle/index.html index 9485013..482243c 100644 --- a/dist/seattle/index.html +++ b/dist/seattle/index.html @@ -38,7 +38,7 @@