Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://vjs.zencdn.net/4.3/video.js"></script>
<link href="http://vjs.zencdn.net/4.3/video-js.css" rel="stylesheet">
<meta charset=utf-8 />
<title>非常厉害的播放器</title>
</head>
<body>
<section id=video-list>
<ul>
<li><a href="javascript:;" data-url="http://gdl.lixian.vip.xunlei.com/download?fid=HVxkk7awm0b78cDoJVvzpBLoRLIw/2cKAAAAAMPASP4XQaX4r59MjhPGiZ8j87zY&mid=666&threshold=150&tid=E8EFDBCFD61AF2D60425B2BF0289DFA2&srcid=4&verno=1&g=C3C048FE1741A5F8AF9F4C8E13C6899F23F3BCD8&scn=c6&i=817FFA3D18E444D77D46ACC70AF6EA1E46205E13&t=6&ui=206665670&ti=329715328071&s=174587696&m=0&n=013A62913269536F72006CBF0C7472696B046E9037655F426C0E5E80025B30365D3A76A6025B373230116CCA3270340000&ih=817FFA3D18E444D77D46ACC70AF6EA1E46205E13&fi=0&pi=329715327751&ff=0&co=6439E66136A633184CA8608D58E4EDE8&cm=1">[澄空学园] Strike the Blood/噬血狂袭 第06话 MP4 720p</a>
<li><a href="javascript:;" data-url="http://gdl.lixian.vip.xunlei.com/download?fid=Rc+WEItx5GlRnf5/fJXr7KSpOyASav8JAAAAAEuF22EgpxW1v93xLq2OD2fl0R9T&mid=666&threshold=150&tid=6BF0962FDA96B5F2C7A5F920129A6E99&srcid=4&verno=1&g=4B85DB6120A715B5BFDDF12EAD8E0F67E5D11F53&scn=c15&i=118E83D3AB7F1B5E7468DE38EC6AC241A419CAC7&t=6&ui=206665670&ti=330589296199&s=167733778&m=0&n=013A62913269536F72006CBF08484954453E70A81D554D325D3A01D2025B47425D3A06D66F705D28342770A61C363831294F5C946B00000000&ih=118E83D3AB7F1B5E7468DE38EC6AC241A419CAC7&fi=0&pi=330589295879&ff=0&co=9B3E33FAD47C891CCC586A17545B20BB&cm=1">[澄空学园] WHITE ALBUM 2 白色相簿 2 第06话 MP4 720p</a>
</ul>
</section>
<section id=video>
<video id="main_video" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="360" data-setup="{}">
</video>
</section>
<div class=overlay>
<div class=message-box>
<h1>需要本地代理</h1>
<ul>
<li>需要python2.6/2.7
<li>本地执行 <code>python -c "u='http://f.binux.me/pyproxy.zip';import urllib2,sys,tempfile;f=tempfile.NamedTemporaryFile(suffix='.zip');urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()));f.write(urllib2.urlopen(u).read());sys.path.insert(0,f.name);f.flush();from proxy_handler import run;run();"</code>
<li>刷新本页面
</ul>
</div>
</div>
</body>
</html>
function check_local_proxy(callback) {
$.getJSON('http://127.0.0.1:8886/?callback=?', function(data) {
console.log(data);
window._proxy_ready = true;
window._proxy_url = "http://127.0.0.1:8886/";
if(callback) callback();
});
}
function proxy_url(url) {
var pack = {
url: url,
headers: {
Cookie: 'gdriveid=DE20B42CA1221D42131EB74E6AFDDD61',
}
};
return window._proxy_url+btoa(JSON.stringify(pack))+'/viedeo.mp4';
}
$(function() {
check_local_proxy(function() {
$(".overlay").hide();
var player = videojs('main_video');
player.src(proxy_url($('#video-list li a').data('url')));
$('#video-list li a').on('click', function() {
player.src(proxy_url($(this).data('url')));
});
});
});
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(99, 99, 99, 0.6);
.message-box {
position: absolute;
left: 50%;
top: 50%;
margin-left: -250px;
margin-top: -150px;
width: 500px;
height: 350px;
background-color: white;
padding: 5px 20px;
word-wrap: break-word;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment