Skip to content

Commit 3d78f98

Browse files
committed
Add earthcam's.
1 parent 7d5cc97 commit 3d78f98

File tree

8 files changed

+45
-42
lines changed

8 files changed

+45
-42
lines changed
Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
URL,Location name,Live thumbnail (ustream only)
2-
http://new.livestream.com/breakinglivenowdirect/sandycam,"Chelsea, Manhattan, NY",
3-
http://www.ustream.tv/channel/atlantic-city-plugged-in,"Atlantic City, NJ",https://secure-static-cdn1.ustream.tv/livethumb/1_2331793_160x120_b.jpg
4-
http://www.ustream.tv/channel/dc-hurricane,"Washington, D.C.",
5-
http://www.ustream.tv/channel/hurricane-sandy,"New York City, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12420876_160x120_b.jpg
6-
http://www.ustream.tv/channel/sandy-the-hurricane,"Wallingford, CT",https://secure-static-cdn1.ustream.tv/livethumb/1_12420106_160x120_b.jpg
7-
http://www.ustream.tv/channel/hurricane-sandy-ac,"Mays Landing, NJ",https://secure-static-cdn1.ustream.tv/livethumb/1_12423918_160x120_b.jpg
8-
http://www.ustream.tv/channel/live-hurricane-sandy-coverage,"Cape Hatteras, NC",https://secure-static-cdn1.ustream.tv/livethumb/1_12387882_160x120_b.jpg
9-
http://www.ustream.tv/channel/hurricane-irene-lynn-ma,"Lynn, MA",https://secure-static-cdn1.ustream.tv/livethumb/1_9171900_160x120_b.jpg
10-
http://www.ustream.tv/recorded/26442316,"Rockaway Park, NY",
11-
http://www.ustream.tv/channel/media-rebel,"Baltimore, MD",
12-
http://www.ustream.tv/channel/hurricane-sandy-ac,"Atlantic City, NJ",https://secure-static-cdn1.ustream.tv/livethumb/1_12423918_160x120_b.jpg
13-
http://www.ustream.tv/channel/hurricane-sandy-brkln-1,"East River, Mid-town Manhattan, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12423431_160x120_b.jpg
14-
http://www.ustream.tv/channel/hurricane-sandy-brkln-2,"East River, Lower Manhattan, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12425101_160x120_b.jpg
15-
http://www.ustream.tv/channel/hurricane-sandy-live-bronx-ny,"Bronx, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12423392_160x120_b.jpg
16-
http://www.justin.tv/atlanticcity911,"Atlantic City, NJ",
17-
http://www.justin.tv/beefdart,"Ocean City, NJ",
18-
http://www.justin.tv/joedirtdaman,"Lafayette, NY",
1+
URL,Location name,Live thumbnail (ustream only),Notes
2+
http://new.livestream.com/breakinglivenowdirect/sandycam,"Chelsea, Manhattan, NY",,
3+
http://www.ustream.tv/channel/atlantic-city-plugged-in,"Atlantic City, NJ",https://secure-static-cdn1.ustream.tv/livethumb/1_2331793_160x120_b.jpg,
4+
http://www.ustream.tv/channel/dc-hurricane,"Washington, D.C.",,
5+
http://www.ustream.tv/channel/hurricane-sandy,"New York City, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12420876_160x120_b.jpg,
6+
http://www.ustream.tv/channel/sandy-the-hurricane,"Wallingford, CT",https://secure-static-cdn1.ustream.tv/livethumb/1_12420106_160x120_b.jpg,
7+
http://www.ustream.tv/channel/hurricane-sandy-ac,"Mays Landing, NJ",https://secure-static-cdn1.ustream.tv/livethumb/1_12423918_160x120_b.jpg,
8+
http://www.ustream.tv/channel/live-hurricane-sandy-coverage,"Cape Hatteras, NC",https://secure-static-cdn1.ustream.tv/livethumb/1_12387882_160x120_b.jpg,
9+
http://www.ustream.tv/channel/hurricane-irene-lynn-ma,"Lynn, MA",https://secure-static-cdn1.ustream.tv/livethumb/1_9171900_160x120_b.jpg,
10+
http://www.ustream.tv/recorded/26442316,"Rockaway Park, NY",,
11+
http://www.ustream.tv/channel/media-rebel,"Baltimore, MD",,
12+
http://www.ustream.tv/channel/hurricane-sandy-ac,"Atlantic City, NJ",https://secure-static-cdn1.ustream.tv/livethumb/1_12423918_160x120_b.jpg,
13+
http://www.ustream.tv/channel/hurricane-sandy-brkln-1,"East River, Mid-town Manhattan, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12423431_160x120_b.jpg,
14+
http://www.ustream.tv/channel/hurricane-sandy-brkln-2,"East River, Lower Manhattan, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12425101_160x120_b.jpg,
15+
http://www.ustream.tv/channel/hurricane-sandy-live-bronx-ny,"Bronx, NY",https://secure-static-cdn1.ustream.tv/livethumb/1_12423392_160x120_b.jpg,
16+
http://www.justin.tv/atlanticcity911,"Atlantic City, NJ",,
17+
http://www.justin.tv/beefdart,"Ocean City, NJ",,
18+
http://www.justin.tv/joedirtdaman,"Lafayette, NY",,
19+
http://justin.tv/technologee#/w/4066352304/2,"New York City, NY",,
20+
http://www.earthcam.com/usa/newyork/statueofliberty/?cam=liberty_hd,"Liberty Island, NY",,
21+
http://www.earthcam.com/usa/newyork/timessquare/?cam=tsrobo3,"New York City, NY",,
22+
http://www.earthcam.com/usa/newjersey/jerseycity/,"Jersey City, NJ",,
23+
http://www.earthcam.com/usa/newyork/brooklynbridge/,"Brooklyn, NY",,
24+
http://www.earthcam.com/usa/newyork/skyline/,"New York City, NY",,"time-lapse, awesome res"

data.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

get_livestreams_and_names.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_cached_page(url):
2929
sources = []
3030
items = iter(reader)
3131
items.next()
32-
for url,locname,livethumb in items:
32+
for url,locname,livethumb,notes in items:
3333
source = {
3434
'location': locname,
3535
'url': url,
@@ -42,7 +42,9 @@ def get_cached_page(url):
4242
source['id'] = re.search("livestream.com/([^/]+)/", url).group(1)
4343
elif "justin" in url:
4444
source['provider'] = "justintv"
45-
source['id'] = re.search("justin.tv/([^/]+)(/|$)", url).group(1)
45+
source['id'] = re.search("justin.tv/([^/#]+)(/|$|#)", url).group(1)
46+
elif "earthcam" in url:
47+
source['provider'] = "earthcam"
4648
else:
4749
assert False, "Unknown provider %s" % url
4850

img/earthcam-fancy.png

8.57 KB
Loading

img/justintv-fancy.png

8.44 KB
Loading

img/livestream-fancy.png

8.27 KB
Loading

img/ustream-fancy.png

8.01 KB
Loading

index.html

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
left: 0;
2424
width: 70%;
2525
text-align: center;
26-
font-size: 38pt;
2726
z-index: 1000;
2827
font-weight: bold;
2928
text-shadow: #999 2px -2px 5px;
30-
margin-left: 15%
29+
margin-left: 15%;
30+
font-size: 38pt;
3131
}
3232
#map {
3333
width: 100%;
@@ -49,9 +49,11 @@
4949
<body>
5050
<div id='map'></div>
5151
<div class='title'>
52-
<span style='color: #900;'>Hurricane Sandy</span>
52+
<span style='color: #900;'>Hurricane Sandy</span>
5353
</div>
5454
<div class='search'>
55+
Help by
56+
<a href='http://bit.ly/hurricanehackers-sandystreams'>Adding more livestreams</a>!<br/>
5557
Find location:
5658
<form id='searchform' method='get' action=''>
5759
<input type='text' id='search' placeholder='e.g. New York' />
@@ -66,19 +68,6 @@
6668
// Replace this with your own API key!
6769
var CLOUDMADE_API_KEY = '647c4a0955a247f894f83468e96ea60d'; // key for http://web.media.mit.edu/~cfd/occupystreamsmap/
6870

69-
// occupystreams.org vanished? Replace with direct links to stream providers.
70-
// whoops, it's back.
71-
//for (var i = 0; i < data.sources.length ; i++) {
72-
// var s = data.sources[i];
73-
// if (s.provider === "livestream") {
74-
// s.url = "http://livestream.com/" + s.id;
75-
// } else if (s.provider === "ustream") {
76-
// s.url = "http://ustream.tv/channel/" + s.id;
77-
// } else if (s.provider === "justintv") {
78-
// s.url = "http://justin.tv/" + s.id;
79-
// }
80-
//}
81-
8271
var generators = {
8372
"livestream": function(source) {
8473
return {
@@ -108,12 +97,22 @@
10897
"ustream": function(source) {
10998
return {
11099
style: {
111-
url: (source.livethumb ? source.livethumb : "img/ustream.jpg"),
100+
url: (source.livethumb ? source.livethumb : "img/ustream-fancy.png"),
112101
width: 25,
113102
height: 25
114103
},
115104
html: ["<h2><a href='", source.url, "'>", source.location, "</a></h2>", "<a href='", source.url, "'><img src='", (source.livethumb ? source.livethumb : "img/ustream.jpg"), "'></a>"].join("")
116105
}
106+
},
107+
"earthcam": function(source) {
108+
return {
109+
style: {
110+
url: "img/earthcam-fancy.png",
111+
width: 25,
112+
height: 25
113+
},
114+
html: ["<h2><a href='", source.url, "'>", source.location, "</a></h2>", "<a href='", source.url, "'><img src='img/earthcam-fancy.png' /></a>"].join("")
115+
}
117116
}
118117
};
119118
var osm = new L.TileLayer("http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", {
@@ -130,9 +129,6 @@
130129

131130
//var WeatherLayer = L.TileLayer.WMS.extend({
132131
// getTileUrl: function(tilePoint, zoom) {
133-
// if (zoom > 5) {
134-
// return null;
135-
// }
136132
// var map = this._map,
137133
// crs = map.options.crs,
138134
// tileSize = this.options.tileSize,
@@ -151,7 +147,6 @@
151147
//
152148
//
153149
//var weather = new WeatherLayer("http://openweathermap.org/t/t?url=", {
154-
// LAYERS: "GLBETA_UV",
155150
// opacity: 0.3,
156151
// maxZoom: 5,
157152
// minZoom: 1,

0 commit comments

Comments
 (0)