Skip to content

Instantly share code, notes, and snippets.

@xaiki
Created August 14, 2014 05:03
Show Gist options
  • Save xaiki/55aa5ca5c44cd238caa4 to your computer and use it in GitHub Desktop.
Save xaiki/55aa5ca5c44cd238caa4 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cherry Clips</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"
type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"
type="text/javascript"></script>
<script type="text/javascript">
$.getJSON('https://archive.org/advancedsearch.php?q=subject%3A%22cherry+clips%22&fl%5B%5D=identifier&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=50&page=1&output=json&save=yes&callback=?',
function (data) {
data.response.docs.forEach (function (d) {
$.getJSON('https://archive.org/details/' + d.identifier + '?output=json&callback=?', function (data) {
var mp4;
_.each (data.files, function (v, k) {
if (k.match (/.mp4$/))
mp4 = k;
});
$('.list').append('<li><a href="' + data.server + mp4 + '">' + data.metadata.title[0] + '</a></li>')
});
});
});
</script>
</head>
<body>
<ul class="list">
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment