This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>test popcorn player</title> | |
<meta charset="utf-8"> | |
<script src="http://cdn.popcornjs.org/code/dist/popcorn-complete.js"></script> | |
<script src="https://raw.github.com/rwaldron/popcorn.sequence/master/popcorn.sequence.js"></script> | |
<script src="http://code.jquery.com/jquery-2.1.0.js"></script> | |
<!-- <script src="popcorn-chain.js"></script> --> | |
<!-- <script src="script1.js"></script> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var urls = ['put', 'your', 'page', 'urls', 'here']; | |
page.onConsoleMessage = function (msg) { | |
if(msg.indexOf('SCRAPE-RESULT:') >= 0) { | |
var fn = 'file_name_to_write_to.txt'; | |
console.log('writing file', fn) | |
fs.write(fn, msg.replace('SCRAPE-RESULT:', ''), 'w'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// timecode is the points we got during the recording | |
// video is the video | |
var events = { | |
{ | |
time: 4.0, | |
f: function() { | |
alert("We are at 4.0 in the video, and this fires."); | |
} | |
}, { | |
time: 8.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Business quote demo</title> | |
<meta charset="utf-8"> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript" src="d3.js" charset="utf-8"></script> | |
<style> | |
body { | |
font: 12px sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"cooccurrences": [ | |
{ | |
"label": "one", | |
"occurrence": "100", | |
"thing": "http://dbpedia.org/resource/Alex_Salmond" | |
}, | |
{ | |
"label": "linkedWithOne", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"occurrences" : [ | |
{ | |
"label" : "one", | |
"thing" : "url_string", | |
"occurrence": 100 | |
},{ | |
"label" : "linkedWithOne", | |
"thing" : "url_string", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "2e952df7-f894-48e4-1fb3-bc26dd3cac31", | |
"name": "Police.uk", | |
"description": "", | |
"order": [ | |
"3727f908-a368-07d7-c707-5cd6be945bf6", | |
"17ea1b33-79fe-b2d3-68f6-3112b3160304", | |
"d14f413a-0756-b3c6-0a11-b99189bf5e1c", | |
"c73977b9-e3a5-25e6-659f-a4d03f255df9", | |
"a1aecba7-a85b-4043-1d54-7abf838cce45", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Barking and Dagenham": "51.517146,0.122688:51.523335,0.15648:51.514469,0.164677:51.530696,0.186926:51.554952,0.182242:51.565324,0.157149:51.561978,0.151963:51.563818,0.146276:51.575528,0.148618:51.582889,0.147614:51.596606,0.141591:51.597777,0.135904:51.598948,0.128543:51.588576,0.130383:51.579376,0.117335:51.561142,0.122354:51.555621,0.096592:51.543075,0.091908:51.54709,0.067484:51.540566,0.078023:51.528688,0.089231:51.524841,0.097763", | |
"Barnet": "51.677572,-0.190803:51.672052,-0.197495:51.672052,-0.196658:51.675063,-0.203517:51.676568,-0.212885:51.67339,-0.210878:51.668037,-0.220246:51.663855,-0.23045:51.659673,-0.249019:51.657498,-0.260561:51.638093,-0.271936:51.641606,-0.278461:51.633576,-0.302383:51.632907,-0.2982:51.623372,-0.271435:51.599785,-0.251026:51.585063,-0.257717:51.580379,-0.254037:51.573521,-0.250022:51.567164,-0.246844:51.57235,-0.240654:51.574692,-0.215729:51.553112,-0.200339:51.553112,-0.172904:51.574357,-0.169224:51.579041,-0.169726:51.586736,-0.160859:51.587405,-0.159019:51.590249 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"51.517146,0.122688:51.523335,0.15648:51.514469,0.164677:51.530696,0.186926:51.554952,0.182242:51.565324,0.157149:51.561978,0.151963:51.563818,0.146276:51.575528,0.148618:51.582889,0.147614:51.596606,0.141591:51.597777,0.135904:51.598948,0.128543:51.588576,0.130383:51.579376,0.117335:51.561142,0.122354:51.555621,0.096592:51.543075,0.091908:51.54709,0.067484:51.540566,0.078023:51.528688,0.089231:51.524841,0.097763", | |
"51.677572,-0.190803:51.672052,-0.197495:51.672052,-0.196658:51.675063,-0.203517:51.676568,-0.212885:51.67339,-0.210878:51.668037,-0.220246:51.663855,-0.23045:51.659673,-0.249019:51.657498,-0.260561:51.638093,-0.271936:51.641606,-0.278461:51.633576,-0.302383:51.632907,-0.2982:51.623372,-0.271435:51.599785,-0.251026:51.585063,-0.257717:51.580379,-0.254037:51.573521,-0.250022:51.567164,-0.246844:51.57235,-0.240654:51.574692,-0.215729:51.553112,-0.200339:51.553112,-0.172904:51.574357,-0.169224:51.579041,-0.169726:51.586736,-0.160859:51.587405,-0.159019:51.590249,-0.163034:51.591755,-0.164038:51.6022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from urllib2 import urlopen | |
BASE_URL = "http://www.chicagoreader.com" | |
def make_soup(url): | |
html = urlopen(url).read() | |
return BeautifulSoup(html, "lxml") | |
def get_category_links(section_url): |
OlderNewer