aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2023-04-07 19:46:23 -0600
committerMelody Horn <melody@boringcactus.com>2023-04-07 19:46:23 -0600
commit77e6222ea3dd21d521bafc6761167b15d32934c7 (patch)
tree5cf308529fd46053d2d7f98cfe4b6b664fbb47a2 /dev
parent27715ca8d3701b4c6c1be3d9aefed9c775313857 (diff)
downloadpig.observer-77e6222ea3dd21d521bafc6761167b15d32934c7.tar.gz
pig.observer-77e6222ea3dd21d521bafc6761167b15d32934c7.zip
fix seattleHEADmaster
Diffstat (limited to 'dev')
-rw-r--r--dev/seattle/convert.py10
1 files changed, 7 insertions, 3 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']