This script I run as a cronjob every minute in order to keep the json file updated. It logs into the infoconnect highway cameras. This is a xml file. I am not a big fan of working with xml files. I can do it, but I'd rather json. This gives me access to my
TODO Add more useful data to the json feed.
In [79]:
import subprocess
import requests
import os
import dominate
import xmltodict
import time
from bs4 import BeautifulSoup
from time import gmtime, strftime
from dominate.tags import *
In [80]:
os.chdir('/home/wcmckee')
In [81]:
#subprocess.call('curl -k -H "username: williammckee" -H "password: J3e6t8q5y2" -o linkz https://infoconnect1.highwayinfo.govt.nz/ic/jbi/TrafficCameras/REST/FeedService/', shell=True)
# <codecell>
opcon = open('linkz', 'r')
In [82]:
opcon = open('linkz', 'r')
In [83]:
data = opcon.read()
In [83]:
In [84]:
datadict = xmltodict.parse(data)
In [85]:
daval = datadict.values()
In [86]:
daitem = datadict.items()
In [87]:
daitem.sort()
In [88]:
daiz = daitem[0][1]
In [89]:
davalz = daiz.values()[4]
In [90]:
dalenz = len(davalz)
In [91]:
davalz[1]['tns:imageUrl']
Out[91]:
u'http://www.trafficnz.info/camera/140.jpg'
In [92]:
chret = []
In [93]:
for deta in range(0, dalenz):
print deta
chret.append(davalz[deta]['tns:imageUrl'])
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
In [94]:
os.chdir('/home/wcmckee/akltanpho')
In [95]:
doc = dominate.document(title='AklMotorCam')
with doc.head:
link(rel='stylesheet', href='style.css')
script(type='text/javascript', src='script.js')
with div():
attr(cls='header')
h1('AklMotorCam')
p(img('imgs/getsdrawn-bw.png', src='imgs/getsdrawn-bw.png'))
h1('Updated ', strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()))
#p(panz)
#p(bodycom)
with doc:
with div(id='body').add(ol()):
for csea in chret:
#h1(rdz.title)
p(img(csea, src='%s' % csea))
#print rdz.url
#if '.jpg' in rdz.url:
# img(rdz.urlz)
#else:
# a(rdz.urlz)
#h1(str(rdz.author))
#li(img(i.lower(), src='%s' % i))
with div():
attr(cls='body')
p('AklMotorCam is open source')
a('https://github.com/wcmckee/wcmckee')
#a('https://reddit.com/r/redditgetsdrawn')
print doc
<!DOCTYPE html>
<html>
<head>
<title>AklMotorCam</title>
<link href="style.css" rel="stylesheet"><script src="script.js" type="text/javascript"></script>
<div class="header">
<h1>AklMotorCam</h1>
<p>
<img src="imgs/getsdrawn-bw.png">
</p>
<h1>Updated Tue, 23 Dec 2014 08:48:49 +0000</h1>
</div>
</head>
<body>
<div id="body">
<ol>
<p>
<img src="http://www.trafficnz.info/camera/130.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/140.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/150.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/160.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/170.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/270.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/271.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/221.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/222.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/223.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/224.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/225.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/171.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/172.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/173.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/174.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/175.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/176.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/177.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/178.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/10.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/20.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/30.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/40.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/50.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/215.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/212.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/214.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/60.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/70.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/80.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/90.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/100.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/110.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/120.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/121.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/122.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/123.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/124.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/125.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/126.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/274.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/275.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/276.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/272.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/273.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/288.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/289.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/290.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/306.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/307.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/190.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/191.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/192.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/193.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/194.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/201.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/202.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/203.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/204.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/205.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/206.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/207.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/208.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/209.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/210.jpg">
</p>
<p>
<img src="http://www.trafficnz.info/camera/211.jpg">
</p>
</ol>
</div>
<div class="body">
<p>AklMotorCam is open source</p>
<a>https://github.com/wcmckee/wcmckee</a>
</div>
</body>
</html>
In [96]:
docakl = doc.render()
In [97]:
yourstring = docakl.encode('ascii', 'ignore').decode('ascii')
In [98]:
indfil = ('/home/wcmckee/akltanpho/index.html')
In [99]:
mkind = open(indfil, 'w')
mkind.write(yourstring)
mkind.close()
In [72]:
#panz()
for csea in chret:
#(rdz.title)
#a(rdz.url)
#for csb in csea:
#print rdz.url
#print (rdz.url)
#url = csb
print csea
#response = requests.get(url)
#with open(str('/home/wcmckee/getsdrawndotcom/' + csea), 'wb') as out_file:
# shutil.copyfileobj(response.raw, out_file)
# del response
http://www.trafficnz.info/camera/130.jpg
http://www.trafficnz.info/camera/140.jpg
http://www.trafficnz.info/camera/150.jpg
http://www.trafficnz.info/camera/160.jpg
http://www.trafficnz.info/camera/170.jpg
http://www.trafficnz.info/camera/270.jpg
http://www.trafficnz.info/camera/271.jpg
http://www.trafficnz.info/camera/221.jpg
http://www.trafficnz.info/camera/222.jpg
http://www.trafficnz.info/camera/223.jpg
http://www.trafficnz.info/camera/224.jpg
http://www.trafficnz.info/camera/225.jpg
http://www.trafficnz.info/camera/171.jpg
http://www.trafficnz.info/camera/172.jpg
http://www.trafficnz.info/camera/173.jpg
http://www.trafficnz.info/camera/174.jpg
http://www.trafficnz.info/camera/175.jpg
http://www.trafficnz.info/camera/176.jpg
http://www.trafficnz.info/camera/177.jpg
http://www.trafficnz.info/camera/178.jpg
http://www.trafficnz.info/camera/10.jpg
http://www.trafficnz.info/camera/20.jpg
http://www.trafficnz.info/camera/30.jpg
http://www.trafficnz.info/camera/40.jpg
http://www.trafficnz.info/camera/50.jpg
http://www.trafficnz.info/camera/215.jpg
http://www.trafficnz.info/camera/212.jpg
http://www.trafficnz.info/camera/214.jpg
http://www.trafficnz.info/camera/60.jpg
http://www.trafficnz.info/camera/70.jpg
http://www.trafficnz.info/camera/80.jpg
http://www.trafficnz.info/camera/90.jpg
http://www.trafficnz.info/camera/100.jpg
http://www.trafficnz.info/camera/110.jpg
http://www.trafficnz.info/camera/120.jpg
http://www.trafficnz.info/camera/121.jpg
http://www.trafficnz.info/camera/122.jpg
http://www.trafficnz.info/camera/123.jpg
http://www.trafficnz.info/camera/124.jpg
http://www.trafficnz.info/camera/125.jpg
http://www.trafficnz.info/camera/126.jpg
http://www.trafficnz.info/camera/274.jpg
http://www.trafficnz.info/camera/275.jpg
http://www.trafficnz.info/camera/276.jpg
http://www.trafficnz.info/camera/272.jpg
http://www.trafficnz.info/camera/273.jpg
http://www.trafficnz.info/camera/288.jpg
http://www.trafficnz.info/camera/289.jpg
http://www.trafficnz.info/camera/290.jpg
http://www.trafficnz.info/camera/306.jpg
http://www.trafficnz.info/camera/307.jpg
http://www.trafficnz.info/camera/190.jpg
http://www.trafficnz.info/camera/191.jpg
http://www.trafficnz.info/camera/192.jpg
http://www.trafficnz.info/camera/193.jpg
http://www.trafficnz.info/camera/194.jpg
http://www.trafficnz.info/camera/201.jpg
http://www.trafficnz.info/camera/202.jpg
http://www.trafficnz.info/camera/203.jpg
http://www.trafficnz.info/camera/204.jpg
http://www.trafficnz.info/camera/205.jpg
http://www.trafficnz.info/camera/206.jpg
http://www.trafficnz.info/camera/207.jpg
http://www.trafficnz.info/camera/208.jpg
http://www.trafficnz.info/camera/209.jpg
http://www.trafficnz.info/camera/210.jpg
http://www.trafficnz.info/camera/211.jpg
In [46]:
chret
Out[46]:
[u'http://www.trafficnz.info/camera/130.jpg',
u'http://www.trafficnz.info/camera/140.jpg',
u'http://www.trafficnz.info/camera/150.jpg',
u'http://www.trafficnz.info/camera/160.jpg',
u'http://www.trafficnz.info/camera/170.jpg',
u'http://www.trafficnz.info/camera/270.jpg',
u'http://www.trafficnz.info/camera/271.jpg',
u'http://www.trafficnz.info/camera/221.jpg',
u'http://www.trafficnz.info/camera/222.jpg',
u'http://www.trafficnz.info/camera/223.jpg',
u'http://www.trafficnz.info/camera/224.jpg',
u'http://www.trafficnz.info/camera/225.jpg',
u'http://www.trafficnz.info/camera/171.jpg',
u'http://www.trafficnz.info/camera/172.jpg',
u'http://www.trafficnz.info/camera/173.jpg',
u'http://www.trafficnz.info/camera/174.jpg',
u'http://www.trafficnz.info/camera/175.jpg',
u'http://www.trafficnz.info/camera/176.jpg',
u'http://www.trafficnz.info/camera/177.jpg',
u'http://www.trafficnz.info/camera/178.jpg',
u'http://www.trafficnz.info/camera/10.jpg',
u'http://www.trafficnz.info/camera/20.jpg',
u'http://www.trafficnz.info/camera/30.jpg',
u'http://www.trafficnz.info/camera/40.jpg',
u'http://www.trafficnz.info/camera/50.jpg',
u'http://www.trafficnz.info/camera/215.jpg',
u'http://www.trafficnz.info/camera/212.jpg',
u'http://www.trafficnz.info/camera/214.jpg',
u'http://www.trafficnz.info/camera/60.jpg',
u'http://www.trafficnz.info/camera/70.jpg',
u'http://www.trafficnz.info/camera/80.jpg',
u'http://www.trafficnz.info/camera/90.jpg',
u'http://www.trafficnz.info/camera/100.jpg',
u'http://www.trafficnz.info/camera/110.jpg',
u'http://www.trafficnz.info/camera/120.jpg',
u'http://www.trafficnz.info/camera/121.jpg',
u'http://www.trafficnz.info/camera/122.jpg',
u'http://www.trafficnz.info/camera/123.jpg',
u'http://www.trafficnz.info/camera/124.jpg',
u'http://www.trafficnz.info/camera/125.jpg',
u'http://www.trafficnz.info/camera/126.jpg',
u'http://www.trafficnz.info/camera/274.jpg',
u'http://www.trafficnz.info/camera/275.jpg',
u'http://www.trafficnz.info/camera/276.jpg',
u'http://www.trafficnz.info/camera/272.jpg',
u'http://www.trafficnz.info/camera/273.jpg',
u'http://www.trafficnz.info/camera/288.jpg',
u'http://www.trafficnz.info/camera/289.jpg',
u'http://www.trafficnz.info/camera/290.jpg',
u'http://www.trafficnz.info/camera/306.jpg',
u'http://www.trafficnz.info/camera/307.jpg',
u'http://www.trafficnz.info/camera/190.jpg',
u'http://www.trafficnz.info/camera/191.jpg',
u'http://www.trafficnz.info/camera/192.jpg',
u'http://www.trafficnz.info/camera/193.jpg',
u'http://www.trafficnz.info/camera/194.jpg',
u'http://www.trafficnz.info/camera/201.jpg',
u'http://www.trafficnz.info/camera/202.jpg',
u'http://www.trafficnz.info/camera/203.jpg',
u'http://www.trafficnz.info/camera/204.jpg',
u'http://www.trafficnz.info/camera/205.jpg',
u'http://www.trafficnz.info/camera/206.jpg',
u'http://www.trafficnz.info/camera/207.jpg',
u'http://www.trafficnz.info/camera/208.jpg',
u'http://www.trafficnz.info/camera/209.jpg',
u'http://www.trafficnz.info/camera/210.jpg',
u'http://www.trafficnz.info/camera/211.jpg']
In [47]:
flis = []
In [48]:
for dinz in datadict.values():
print (dinz)
flis.append(dinz)
OrderedDict([(u'@xmlns:rem', u'http://remote.service.callcenter.nzta.govt.nz'), (u'@xmlns:tns', u'https://infoconnect.highwayinfo.govt.nz/schemas/camera'), (u'@xmlns:xsd', u'http://www.w3.org/2001/XMLSchema'), (u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'tns:camera', [OrderedDict([(u'tns:id', u'130'), (u'tns:name', u'SH16 1 Bond St'), (u'tns:description', u'Bond St looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/130.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/130'), (u'tns:mapx', u'142'), (u'tns:mapy', u'229'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'St Lukes Rd - Newton Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Newton Rd - St Lukes Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'140'), (u'tns:name', u'SH16 2 Gt North Rd'), (u'tns:description', u'Gt North Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/140.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/140'), (u'tns:mapx', u'113'), (u'tns:mapy', u'232'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Great Nth Rd Waterview - Rosebank Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Rosebank Rd - Great Nth Rd Waterview'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'150'), (u'tns:name', u'SH16 3 Te Atatu Rd'), (u'tns:description', u'Te Atatu Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/150.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/150'), (u'tns:mapx', u'70'), (u'tns:mapy', u'216'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Te Atatu Rd - Rosebank Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Rosebank Rd - Te Atatu Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'160'), (u'tns:name', u'SH16 4 Lincoln Rd E'), (u'tns:description', u'Lincoln Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/160.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/160'), (u'tns:mapx', u'52'), (u'tns:mapy', u'207'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Lincoln Rd - Te Atatu Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Te Atatu Rd - Lincoln Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Moderate')])])]), OrderedDict([(u'tns:id', u'170'), (u'tns:name', u'SH16 5 Lincoln Rd W'), (u'tns:description', u'Lincoln Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/170.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/170'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Lincoln Rd - Royal Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Royal Rd - Lincoln Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'270'), (u'tns:name', u'SH16 6 Hobsonville W'), (u'tns:description', u'Hobsonville looking West towards Kumeu'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/270.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/270'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'271'), (u'tns:name', u'SH16 7 Hobsonville E'), (u'tns:description', u'Hobsonville Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/271.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/271'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'221'), (u'tns:name', u'SH18 Trig Rd'), (u'tns:description', u'Trig Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/221.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/221'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'222'), (u'tns:name', u'SH18 Waiarohia Creek'), (u'tns:description', u'Waiarohia Creek looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/222.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/222'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'223'), (u'tns:name', u'SH18 Brigham Creek'), (u'tns:description', u'Brigham Creek Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/223.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/223'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'224'), (u'tns:name', u'SH18 Sinton Rd'), (u'tns:description', u'Sinton Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/224.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/224'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'225'), (u'tns:name', u'SH18 Squadron Dr'), (u'tns:description', u'Squadron Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/225.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/225'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'171'), (u'tns:name', u'SH18 6 Tauhinu BRG'), (u'tns:description', u'Tauhinu Bridge looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/171.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/171'), (u'tns:mapx', u'60'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'172'), (u'tns:name', u'SH18 7 Albany HWY'), (u'tns:description', u'Albany Highway looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/172.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/172'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'173'), (u'tns:name', u'SH18 8 Tauhinu East'), (u'tns:description', u'Tauhinu East looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/173.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/173'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'174'), (u'tns:name', u'SH18 9 Paul Matthews'), (u'tns:description', u'Paul Matthews Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/174.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/174'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'175'), (u'tns:name', u'SH18 10 Greenhithe'), (u'tns:description', u'Greenhithe Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/175.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/175'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'176'), (u'tns:name', u'SH18 11 George Deane'), (u'tns:description', u'George Deane Pl looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/176.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/176'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'177'), (u'tns:name', u'SH18 12 Upper Hbr CW'), (u'tns:description', u'Upper Harbour Bridge looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/177.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/177'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'178'), (u'tns:name', u'SH18 13 Wicklam Lane'), (u'tns:description', u'Wicklam Lane looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/178.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/178'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'10'), (u'tns:name', u'SH1 1 Greville Rd'), (u'tns:description', u'Greville Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/10.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/10'), (u'tns:mapx', u'125'), (u'tns:mapy', u'71'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Oteha Valley Rd - Upper Harb Hwy'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Upper Harb Hwy - Oteha Valley Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'20'), (u'tns:name', u'SH1 2 Tristram Ave'), (u'tns:description', u'Tristram Ave looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/20.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/20'), (u'tns:mapx', u'148'), (u'tns:mapy', u'118'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Tristram Ave - Esmonde Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Esmonde Rd - Tristram Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'30'), (u'tns:name', u'SH1 3 Northcote Rd'), (u'tns:description', u'Northcote Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/30.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/30'), (u'tns:mapx', u'156'), (u'tns:mapy', u'141'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Tristram Ave - Esmonde Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Esmonde Rd - Tristram Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'40'), (u'tns:name', u'SH1 4 Esmonde Rd'), (u'tns:description', u'Esmonde Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/40.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/40'), (u'tns:mapx', u'178'), (u'tns:mapy', u'146'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Esmonde Rd - Onewa'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Stafford Rd - Esmonde Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'50'), (u'tns:name', u'SH1 5 Onewa Rd'), (u'tns:description', u'Onewa Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/50.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/50'), (u'tns:mapx', u'157'), (u'tns:mapy', u'162'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Stafford Rd - Esmonde Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Harbour Bridge'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Moderate')])])]), OrderedDict([(u'tns:id', u'215'), (u'tns:name', u'SH1 Alpurt Web cam'), (u'tns:description', u'Johnstone Hill Tunnels looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/215.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/215'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'212'), (u'tns:name', u'SH1 17 Goodwood'), (u'tns:description', u'Goodwood Heights looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/212.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/212'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'214'), (u'tns:name', u'SH1 18 Rainbows End'), (u'tns:description', u'Rainbows End looking North at the SH20 link'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/214.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/214'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'60'), (u'tns:name', u'SH1 1 CMJ'), (u'tns:description', u'Central Motorway Junction (CMJ) looking South at the SH16 to SH1 link'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/60.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/60'), (u'tns:mapx', u'162'), (u'tns:mapy', u'217'), (u'tns:congestionLocation', OrderedDict([(u'tns:name', u'Nelson St - Gillies Ave'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]))]), OrderedDict([(u'tns:id', u'70'), (u'tns:name', u'SH1 2 Market Rd'), (u'tns:description', u'Newmarket Viaduct looking South towards Market Rd'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/70.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/70'), (u'tns:mapx', u'183'), (u'tns:mapy', u'241'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Gillies Ave - Greenlane'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Greenlane - Gillies Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'80'), (u'tns:name', u'SH1 3 Greenlane Rd'), (u'tns:description', u'Greenlane Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/80.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/80'), (u'tns:mapx', u'198'), (u'tns:mapy', u'262'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Gillies Ave - Greenlane'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Greenlane - Gillies Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'90'), (u'tns:name', u'SH1 4 SE Highway'), (u'tns:description', u'South Eastern Hwy looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/90.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/90'), (u'tns:mapx', u'219'), (u'tns:mapy', u'278'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Mt Wellington Hway - SE Highway'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'SE Highway - Mt Wellington Hway'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Moderate')])])]), OrderedDict([(u'tns:id', u'100'), (u'tns:name', u'SH1 5 Redoubt Rd'), (u'tns:description', u'Redoubt Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/100.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/100'), (u'tns:mapx', u'254'), (u'tns:mapy', u'341'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Hill Rd - Redoubt Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Redoubt Rd - Hill Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'110'), (u'tns:name', u'SH1 6 Bairds Rd'), (u'tns:description', u'Bairds Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/110.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/110'), (u'tns:mapx', u'275'), (u'tns:mapy', u'383'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'East Tamaki Rd - Princes St'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Princes St - East Tamaki Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'120'), (u'tns:name', u'SH1 7 Alfriston Rd'), (u'tns:description', u'Alfriston Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/120.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/120'), (u'tns:mapx', u'291'), (u'tns:mapy', u'411'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Takanini - Hill Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Hill Rd - Takanini'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'121'), (u'tns:name', u'SH1 8 Takanini'), (u'tns:description', u'Takanini looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/121.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/121'), (u'tns:mapx', u'290'), (u'tns:mapy', u'380')]), OrderedDict([(u'tns:id', u'122'), (u'tns:name', u'SH1 9 Walter Streven'), (u'tns:description', u'Walter Strevens Dr looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/122.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/122'), (u'tns:mapx', u'285'), (u'tns:mapy', u'400')]), OrderedDict([(u'tns:id', u'123'), (u'tns:name', u'SH1 10 Pahurehure'), (u'tns:description', u'Pahurehure looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/123.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/123'), (u'tns:mapx', u'265'), (u'tns:mapy', u'410')]), OrderedDict([(u'tns:id', u'124'), (u'tns:name', u'SH1 11 Rushgreen Ave'), (u'tns:description', u'Rushgreen Ave looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/124.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/124'), (u'tns:mapx', u'285'), (u'tns:mapy', u'420')]), OrderedDict([(u'tns:id', u'125'), (u'tns:name', u'SH1 12 Park Estate'), (u'tns:description', u'Park Estate looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/125.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/125'), (u'tns:mapx', u'300'), (u'tns:mapy', u'430')]), OrderedDict([(u'tns:id', u'126'), (u'tns:name', u'SH1 13 Slippery Crk'), (u'tns:description', u'Slippery Creek looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/126.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/126'), (u'tns:mapx', u'286'), (u'tns:mapy', u'445')]), OrderedDict([(u'tns:id', u'274'), (u'tns:name', u'SH20A Montgomerie Rd'), (u'tns:description', u'Montgomerie Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/274.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/274'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'275'), (u'tns:name', u'SH20A Kirkbride Road'), (u'tns:description', u'Kirkbride Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/275.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/275'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'276'), (u'tns:name', u'SH20A Bader Drive'), (u'tns:description', u'Bader Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/276.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/276'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'272'), (u'tns:name', u'SH20B Prices Road'), (u'tns:description', u'Prices Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/272.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/272'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'273'), (u'tns:name', u'SH20B Waokauri Creek'), (u'tns:description', u'Waokauri Creek looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/273.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/273'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'288'), (u'tns:name', u'SH20 Selfs Rd'), (u'tns:description', u'Selfs Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/288.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/288'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'289'), (u'tns:name', u'SH20 Gee Pl'), (u'tns:description', u'Gee Pl looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/289.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/289'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'290'), (u'tns:name', u'SH20 Massey Rd'), (u'tns:description', u'Massey Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/290.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/290'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'306'), (u'tns:name', u'SH20A Interchange'), (u'tns:description', u'SH20A Interchange'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/306.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/306'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'307'), (u'tns:name', u'SH20 Bader Drive'), (u'tns:description', u'SH20 Bader Drive'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/307.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/307'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'190'), (u'tns:name', u'SH20 1 Queenstown Rd'), (u'tns:description', u'Queenstown Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/190.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/190'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'191'), (u'tns:name', u'SH20 2 Hillsborough'), (u'tns:description', u'Hillsborough Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/191.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/191'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'192'), (u'tns:name', u'SH20 3 Melrose'), (u'tns:description', u'Melrose Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/192.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/192'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'193'), (u'tns:name', u'SH20 4 Dominion Rd'), (u'tns:description', u'Dominion Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/193.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/193'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'194'), (u'tns:name', u'SH20 5 Sandringham'), (u'tns:description', u'Sandringham looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/194.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/194'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'201'), (u'tns:name', u'SH20 6 Gloucester Pk'), (u'tns:description', u'Gloucester Park looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/201.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/201'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'202'), (u'tns:name', u'SH20 7 Onehunga'), (u'tns:description', u'Onehunga Wharf looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/202.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/202'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'203'), (u'tns:name', u'SH20 8 Rimu Rd'), (u'tns:description', u'Rimu Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/203.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/203'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'204'), (u'tns:name', u'SH20 9 Crawford Ave'), (u'tns:description', u'Crawford Ave looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/204.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/204'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'205'), (u'tns:name', u'SH20 Coronation Rd'), (u'tns:description', u'Coronation Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/205.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/205'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'206'), (u'tns:name', u'SH20 11 Puhinui Rd'), (u'tns:description', u'Puhinui Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/206.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/206'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'207'), (u'tns:name', u'SH20 12 Nesdale Road'), (u'tns:description', u'Nesdale Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/207.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/207'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'208'), (u'tns:name', u'SH20 13 Plunket Ave'), (u'tns:description', u'Plunket Ave looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/208.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/208'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'209'), (u'tns:name', u'SH20 14 Lambie Drive'), (u'tns:description', u'Lambie Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/209.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/209'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'210'), (u'tns:name', u'SH20 15 Barrowcliffe'), (u'tns:description', u'Barrowcliffe Pl looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/210.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/210'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'211'), (u'tns:name', u'SH20 16 Great South'), (u'tns:description', u'Great South Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/211.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/211'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')])])])
In [48]:
In [49]:
for itz in flis:
print (itz)
OrderedDict([(u'@xmlns:rem', u'http://remote.service.callcenter.nzta.govt.nz'), (u'@xmlns:tns', u'https://infoconnect.highwayinfo.govt.nz/schemas/camera'), (u'@xmlns:xsd', u'http://www.w3.org/2001/XMLSchema'), (u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'tns:camera', [OrderedDict([(u'tns:id', u'130'), (u'tns:name', u'SH16 1 Bond St'), (u'tns:description', u'Bond St looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/130.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/130'), (u'tns:mapx', u'142'), (u'tns:mapy', u'229'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'St Lukes Rd - Newton Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Newton Rd - St Lukes Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'140'), (u'tns:name', u'SH16 2 Gt North Rd'), (u'tns:description', u'Gt North Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/140.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/140'), (u'tns:mapx', u'113'), (u'tns:mapy', u'232'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Great Nth Rd Waterview - Rosebank Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Rosebank Rd - Great Nth Rd Waterview'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'150'), (u'tns:name', u'SH16 3 Te Atatu Rd'), (u'tns:description', u'Te Atatu Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/150.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/150'), (u'tns:mapx', u'70'), (u'tns:mapy', u'216'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Te Atatu Rd - Rosebank Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Rosebank Rd - Te Atatu Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'160'), (u'tns:name', u'SH16 4 Lincoln Rd E'), (u'tns:description', u'Lincoln Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/160.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/160'), (u'tns:mapx', u'52'), (u'tns:mapy', u'207'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Lincoln Rd - Te Atatu Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Te Atatu Rd - Lincoln Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Moderate')])])]), OrderedDict([(u'tns:id', u'170'), (u'tns:name', u'SH16 5 Lincoln Rd W'), (u'tns:description', u'Lincoln Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/170.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/170'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Lincoln Rd - Royal Rd'), (u'tns:direction', u'Westbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Royal Rd - Lincoln Rd'), (u'tns:direction', u'Eastbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'270'), (u'tns:name', u'SH16 6 Hobsonville W'), (u'tns:description', u'Hobsonville looking West towards Kumeu'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/270.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/270'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'271'), (u'tns:name', u'SH16 7 Hobsonville E'), (u'tns:description', u'Hobsonville Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/271.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/271'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'221'), (u'tns:name', u'SH18 Trig Rd'), (u'tns:description', u'Trig Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/221.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/221'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'222'), (u'tns:name', u'SH18 Waiarohia Creek'), (u'tns:description', u'Waiarohia Creek looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/222.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/222'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'223'), (u'tns:name', u'SH18 Brigham Creek'), (u'tns:description', u'Brigham Creek Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/223.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/223'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'224'), (u'tns:name', u'SH18 Sinton Rd'), (u'tns:description', u'Sinton Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/224.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/224'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'225'), (u'tns:name', u'SH18 Squadron Dr'), (u'tns:description', u'Squadron Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/225.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/225'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'171'), (u'tns:name', u'SH18 6 Tauhinu BRG'), (u'tns:description', u'Tauhinu Bridge looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/171.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/171'), (u'tns:mapx', u'60'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'172'), (u'tns:name', u'SH18 7 Albany HWY'), (u'tns:description', u'Albany Highway looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/172.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/172'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'173'), (u'tns:name', u'SH18 8 Tauhinu East'), (u'tns:description', u'Tauhinu East looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/173.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/173'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'174'), (u'tns:name', u'SH18 9 Paul Matthews'), (u'tns:description', u'Paul Matthews Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/174.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/174'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'175'), (u'tns:name', u'SH18 10 Greenhithe'), (u'tns:description', u'Greenhithe Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/175.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/175'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'176'), (u'tns:name', u'SH18 11 George Deane'), (u'tns:description', u'George Deane Pl looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/176.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/176'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'177'), (u'tns:name', u'SH18 12 Upper Hbr CW'), (u'tns:description', u'Upper Harbour Bridge looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/177.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/177'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'178'), (u'tns:name', u'SH18 13 Wicklam Lane'), (u'tns:description', u'Wicklam Lane looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/178.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/178'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'10'), (u'tns:name', u'SH1 1 Greville Rd'), (u'tns:description', u'Greville Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/10.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/10'), (u'tns:mapx', u'125'), (u'tns:mapy', u'71'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Oteha Valley Rd - Upper Harb Hwy'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Upper Harb Hwy - Oteha Valley Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'20'), (u'tns:name', u'SH1 2 Tristram Ave'), (u'tns:description', u'Tristram Ave looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/20.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/20'), (u'tns:mapx', u'148'), (u'tns:mapy', u'118'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Tristram Ave - Esmonde Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Esmonde Rd - Tristram Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'30'), (u'tns:name', u'SH1 3 Northcote Rd'), (u'tns:description', u'Northcote Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/30.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/30'), (u'tns:mapx', u'156'), (u'tns:mapy', u'141'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Tristram Ave - Esmonde Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Esmonde Rd - Tristram Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'40'), (u'tns:name', u'SH1 4 Esmonde Rd'), (u'tns:description', u'Esmonde Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/40.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/40'), (u'tns:mapx', u'178'), (u'tns:mapy', u'146'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Esmonde Rd - Onewa'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Stafford Rd - Esmonde Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'50'), (u'tns:name', u'SH1 5 Onewa Rd'), (u'tns:description', u'Onewa Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/50.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/50'), (u'tns:mapx', u'157'), (u'tns:mapy', u'162'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Stafford Rd - Esmonde Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Harbour Bridge'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Moderate')])])]), OrderedDict([(u'tns:id', u'215'), (u'tns:name', u'SH1 Alpurt Web cam'), (u'tns:description', u'Johnstone Hill Tunnels looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/215.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/215'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'212'), (u'tns:name', u'SH1 17 Goodwood'), (u'tns:description', u'Goodwood Heights looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/212.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/212'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'214'), (u'tns:name', u'SH1 18 Rainbows End'), (u'tns:description', u'Rainbows End looking North at the SH20 link'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/214.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/214'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'60'), (u'tns:name', u'SH1 1 CMJ'), (u'tns:description', u'Central Motorway Junction (CMJ) looking South at the SH16 to SH1 link'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/60.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/60'), (u'tns:mapx', u'162'), (u'tns:mapy', u'217'), (u'tns:congestionLocation', OrderedDict([(u'tns:name', u'Nelson St - Gillies Ave'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]))]), OrderedDict([(u'tns:id', u'70'), (u'tns:name', u'SH1 2 Market Rd'), (u'tns:description', u'Newmarket Viaduct looking South towards Market Rd'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/70.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/70'), (u'tns:mapx', u'183'), (u'tns:mapy', u'241'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Gillies Ave - Greenlane'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Greenlane - Gillies Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'80'), (u'tns:name', u'SH1 3 Greenlane Rd'), (u'tns:description', u'Greenlane Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/80.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/80'), (u'tns:mapx', u'198'), (u'tns:mapy', u'262'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Gillies Ave - Greenlane'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Greenlane - Gillies Ave'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'90'), (u'tns:name', u'SH1 4 SE Highway'), (u'tns:description', u'South Eastern Hwy looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/90.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/90'), (u'tns:mapx', u'219'), (u'tns:mapy', u'278'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Mt Wellington Hway - SE Highway'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'SE Highway - Mt Wellington Hway'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Moderate')])])]), OrderedDict([(u'tns:id', u'100'), (u'tns:name', u'SH1 5 Redoubt Rd'), (u'tns:description', u'Redoubt Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/100.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/100'), (u'tns:mapx', u'254'), (u'tns:mapy', u'341'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Hill Rd - Redoubt Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Redoubt Rd - Hill Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'110'), (u'tns:name', u'SH1 6 Bairds Rd'), (u'tns:description', u'Bairds Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/110.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/110'), (u'tns:mapx', u'275'), (u'tns:mapy', u'383'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'East Tamaki Rd - Princes St'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Princes St - East Tamaki Rd'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'120'), (u'tns:name', u'SH1 7 Alfriston Rd'), (u'tns:description', u'Alfriston Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/120.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/120'), (u'tns:mapx', u'291'), (u'tns:mapy', u'411'), (u'tns:congestionLocation', [OrderedDict([(u'tns:name', u'Takanini - Hill Rd'), (u'tns:direction', u'Northbound'), (u'tns:congestion', u'Free Flow')]), OrderedDict([(u'tns:name', u'Hill Rd - Takanini'), (u'tns:direction', u'Southbound'), (u'tns:congestion', u'Free Flow')])])]), OrderedDict([(u'tns:id', u'121'), (u'tns:name', u'SH1 8 Takanini'), (u'tns:description', u'Takanini looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/121.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/121'), (u'tns:mapx', u'290'), (u'tns:mapy', u'380')]), OrderedDict([(u'tns:id', u'122'), (u'tns:name', u'SH1 9 Walter Streven'), (u'tns:description', u'Walter Strevens Dr looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/122.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/122'), (u'tns:mapx', u'285'), (u'tns:mapy', u'400')]), OrderedDict([(u'tns:id', u'123'), (u'tns:name', u'SH1 10 Pahurehure'), (u'tns:description', u'Pahurehure looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/123.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/123'), (u'tns:mapx', u'265'), (u'tns:mapy', u'410')]), OrderedDict([(u'tns:id', u'124'), (u'tns:name', u'SH1 11 Rushgreen Ave'), (u'tns:description', u'Rushgreen Ave looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/124.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/124'), (u'tns:mapx', u'285'), (u'tns:mapy', u'420')]), OrderedDict([(u'tns:id', u'125'), (u'tns:name', u'SH1 12 Park Estate'), (u'tns:description', u'Park Estate looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/125.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/125'), (u'tns:mapx', u'300'), (u'tns:mapy', u'430')]), OrderedDict([(u'tns:id', u'126'), (u'tns:name', u'SH1 13 Slippery Crk'), (u'tns:description', u'Slippery Creek looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/126.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/126'), (u'tns:mapx', u'286'), (u'tns:mapy', u'445')]), OrderedDict([(u'tns:id', u'274'), (u'tns:name', u'SH20A Montgomerie Rd'), (u'tns:description', u'Montgomerie Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/274.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/274'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'275'), (u'tns:name', u'SH20A Kirkbride Road'), (u'tns:description', u'Kirkbride Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/275.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/275'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'276'), (u'tns:name', u'SH20A Bader Drive'), (u'tns:description', u'Bader Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/276.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/276'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'272'), (u'tns:name', u'SH20B Prices Road'), (u'tns:description', u'Prices Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/272.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/272'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'273'), (u'tns:name', u'SH20B Waokauri Creek'), (u'tns:description', u'Waokauri Creek looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/273.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/273'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'288'), (u'tns:name', u'SH20 Selfs Rd'), (u'tns:description', u'Selfs Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/288.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/288'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'289'), (u'tns:name', u'SH20 Gee Pl'), (u'tns:description', u'Gee Pl looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/289.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/289'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'290'), (u'tns:name', u'SH20 Massey Rd'), (u'tns:description', u'Massey Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/290.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/290'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'306'), (u'tns:name', u'SH20A Interchange'), (u'tns:description', u'SH20A Interchange'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/306.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/306'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'307'), (u'tns:name', u'SH20 Bader Drive'), (u'tns:description', u'SH20 Bader Drive'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/307.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/307'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'190'), (u'tns:name', u'SH20 1 Queenstown Rd'), (u'tns:description', u'Queenstown Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/190.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/190'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'191'), (u'tns:name', u'SH20 2 Hillsborough'), (u'tns:description', u'Hillsborough Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/191.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/191'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'192'), (u'tns:name', u'SH20 3 Melrose'), (u'tns:description', u'Melrose Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/192.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/192'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'193'), (u'tns:name', u'SH20 4 Dominion Rd'), (u'tns:description', u'Dominion Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/193.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/193'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'194'), (u'tns:name', u'SH20 5 Sandringham'), (u'tns:description', u'Sandringham looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/194.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/194'), (u'tns:mapx', u'35'), (u'tns:mapy', u'207')]), OrderedDict([(u'tns:id', u'201'), (u'tns:name', u'SH20 6 Gloucester Pk'), (u'tns:description', u'Gloucester Park looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/201.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/201'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'202'), (u'tns:name', u'SH20 7 Onehunga'), (u'tns:description', u'Onehunga Wharf looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/202.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/202'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'203'), (u'tns:name', u'SH20 8 Rimu Rd'), (u'tns:description', u'Rimu Rd looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/203.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/203'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'204'), (u'tns:name', u'SH20 9 Crawford Ave'), (u'tns:description', u'Crawford Ave looking North'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/204.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/204'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'205'), (u'tns:name', u'SH20 Coronation Rd'), (u'tns:description', u'Coronation Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/205.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/205'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'206'), (u'tns:name', u'SH20 11 Puhinui Rd'), (u'tns:description', u'Puhinui Rd looking South'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/206.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/206'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'207'), (u'tns:name', u'SH20 12 Nesdale Road'), (u'tns:description', u'Nesdale Rd looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/207.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/207'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'208'), (u'tns:name', u'SH20 13 Plunket Ave'), (u'tns:description', u'Plunket Ave looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/208.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/208'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'209'), (u'tns:name', u'SH20 14 Lambie Drive'), (u'tns:description', u'Lambie Dr looking East'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/209.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/209'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'210'), (u'tns:name', u'SH20 15 Barrowcliffe'), (u'tns:description', u'Barrowcliffe Pl looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/210.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/210'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')]), OrderedDict([(u'tns:id', u'211'), (u'tns:name', u'SH20 16 Great South'), (u'tns:description', u'Great South Rd looking West'), (u'tns:offline', u'false'), (u'tns:underMaintenance', u'false'), (u'tns:imageUrl', u'http://www.trafficnz.info/camera/211.jpg'), (u'tns:viewUrl', u'http://www.trafficnz.info/camera/view/211'), (u'tns:mapx', u'0'), (u'tns:mapy', u'0')])])])
In [50]:
#savxml = open('/home/will/Desktop/brobeur-static/feeds/aklmcam.json', 'w')
#savxml.write(data)
#savxml.close()
In [51]:
import json
jsononjz = json.dumps(datadict)
#read the data back in
#newDictionary = json.load(datadict)
In [52]:
len(jsononjz)
Out[52]:
25275
In [53]:
savcdat = open('/home/wcmckee/brobeur-static/feeds/aklmcam.json', 'w')
savcdat.write(str(jsononjz))
savcdat.close()
print('done uploading feed!')
done uploading feed!
In [53]:
In [ ]:
Content source: wcmckee/wcmckee-notebook
Similar notebooks: