Skip to content

Instantly share code, notes, and snippets.

View cnbeining's full-sized avatar

David Zhuang cnbeining

View GitHub Profile
@cnbeining
cnbeining / dilidili.py
Created October 26, 2015 05:05
For you-get, test only
#!/usr/bin/env python
__all__ = ['dilidili_download']
from ..common import *
#----------------------------------------------------------------------
def dilidili_parser_data_to_stream_types(typ ,vid ,hd2 ,sign):
"""->list"""
parse_url = 'http://player.005.tv/parse.php?xmlurl=null&type={typ}&vid={vid}&hd={hd2}&sign={sign}'.format(typ = typ, vid = vid, hd2 = hd2, sign = sign)
@cnbeining
cnbeining / get_click.py
Created November 2, 2015 01:44
Get bilibili click URL
#!/usr/bin/env python
#coding:utf-8
# Author: Beining --<i#cnbeining.com>
# Purpose: Get Bilibili click URL
# Created: 11/01/2015
#----------------------------------------------------------------------
def get_bilibili_click_url(aid = 0, mid = 0):
""""""
js_content = get_count_js(aid, mid)
@cnbeining
cnbeining / getVideo.py
Created November 3, 2015 06:34
Replacement of getVideo of Acfun
import web
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
urls = (
'/getVideo', 'getVideo'
)
@cnbeining
cnbeining / shit.sh
Created November 3, 2015 18:01
Mediainfo of acfun shit
$ mediainfo 1764019_720p.mp4
General
Complete name : 1764019_720p.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 19.3 MiB
Duration : 3mn 47s
Overall bit rate : 713 Kbps<-------WTF????
Encoded date : UTC 1904-01-01 00:00:00
@cnbeining
cnbeining / LICENSE
Last active January 5, 2016 06:35
Auto reply Acfun's msg | 自动按正则回复acfun的私信
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
@cnbeining
cnbeining / hls.html
Created February 17, 2016 05:13
HLS.js Sample page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>UofTHacksLive! - 2016</title>
<script src="hls.js"></script>
</head>
<body>
<div id="player1">
<video id="video-1" autobuffer="true" data-setup="{}" controls>
class TestBT(unittest.TestCase):
@timeout(4)
def setUp(self):
BTN = ex10.BTNode
self.node12 = BTN(12)
self.node11 = BTN(11, None, self.node12)
self.node10 = BTN(10, self.node11)
self.node9 = BTN(9)
self.node8 = BTN(8)
@cnbeining
cnbeining / tkey.js
Created July 17, 2016 04:28
tkey letv
var C6O = (function() {
var U4 = 37.563E2 > 90.189E2 ? (0x3c, 0x55) : (45.3E3, 64E1) <= (0x5, 25.001E0) ? (0x28, 70.47E1) : (24.2E1, 72.4E0) <= 40.8E+1 ? (0x16, 0x1e0426d83f75) : 74.,
M4 = (function(V3, k2) {
var T0 = "",
I8 = (2., 0x4d) < 0x1e ? (84.8E2, 57.4E+3) : 68.8E3 <= 49. ? 85.412E1 : (0x3f, 69.21E+3) <= (55.7E+2, 7.187E3) ? (0x25, 31.) : (0xa, 35.) > (2, 1.) ? (88.755E0, false) : (27, 18.93E2) < (0x4b, 0x3) ? 45. : 20.4E2;
if (V3.length > (12.1E1, 0x2f) <= (97.58E2, 15.114E+2) ? (0x27, 0xc) : (6., 11.43E1) >= 84. ? (52.606E0, 98.67E2) : 52.55E1 >= (0x1, 0x5d) ? 0x5e : (26.7E2, 0x28))
for (var h8 = 32.32E2 <= 0x25 ? (44.873E2, 0x5e) : 72 < 0x6 ? (0x1e, 0x11) : (5.564E3, 95.02E+1) <= (16., 0x1f) ? 0x16 : 0x1b > 0x3b ? (37, 0x51) : (0x53, 36.05E0) >= (0x30, 0x61) ? (67.1E+1, 0x6) : 0x3b <= (0x3b, 0x3f) ? 0xd : (0xa, 0x63) < (52.9E+3, 80.) ? 24.2E2 : 97.; h8 > 1;) T0 += (I8 = I8 ? (0x26, 74.) >= (85.81E0, 0x55) ? (3., 53.4E1) : (0x48, 4.
@cnbeining
cnbeining / addhonourcode.sh
Last active July 26, 2016 22:02
addhonourcode.sh: Add honour code for UofT CSCB07 projects on every source file.
#!/bin/sh
: '
addhonourcode.sh: Add honour code for UofT CSCB07 projects on every source file.
License: GPL v3 or later.
Usage: addhonourcode.sh NAME_OF_THE_PROJECT UTORID Student# Your_Name_Quoted
Put under the SOURCE CODE FOLDER, and make sure there does not
exist any other file that you do not want the code being added
This file has been truncated, but you can view the full file.
/******/
(function(modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/ // The require function
/******/
function __webpack_require__(moduleId) {