aboutsummaryrefslogtreecommitdiff
path: root/dev/georgia/convert.py
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-06-03 12:23:59 -0600
committerMelody Horn <melody@boringcactus.com>2020-06-03 12:23:59 -0600
commitf9d5c1c0d52d78ca7011a52be094459731ae7099 (patch)
tree7e63ca939e46fa40e80320d329e50a203d551db7 /dev/georgia/convert.py
parentc1dcdab60be115395b6730b0fae274b11f57b0eb (diff)
downloadpig.observer-f9d5c1c0d52d78ca7011a52be094459731ae7099.tar.gz
pig.observer-f9d5c1c0d52d78ca7011a52be094459731ae7099.zip
add workaround for weird georgia website behavior
Diffstat (limited to 'dev/georgia/convert.py')
-rw-r--r--dev/georgia/convert.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/dev/georgia/convert.py b/dev/georgia/convert.py
index eddcbb0..6bae48c 100644
--- a/dev/georgia/convert.py
+++ b/dev/georgia/convert.py
@@ -14,8 +14,10 @@ for camera in cameras:
result['id'] = camera['properties']['cctv_id']
if 'HLS' in camera['properties']:
result['stream'] = camera['properties']['HLS']
+ elif camera['properties']['url'] is not None:
+ result['url'] = camera['properties']['url'].replace('http://navigator-c2c.dot.ga.gov/snapshots', '/georgiasnapshots')
else:
- result['url'] = camera['properties']['url']
+ continue
result['name'] = camera['properties']['location_description']
sources[subdiv].append(result)
with open('sources.js', 'w') as f: