Skip to content

Instantly share code, notes, and snippets.

View Sg4Dylan's full-sized avatar
🐱

SgDylan Sg4Dylan

🐱
View GitHub Profile
@Sg4Dylan
Sg4Dylan / getLiveComment.py
Last active February 14, 2018 05:04
简单的Bilibili直播弹幕抓取实现
#!/usr/bin/env python
import socket
import binascii
import threading
import time
import json
reconnect_flag = 0
@Sg4Dylan
Sg4Dylan / bilibili_download_them_all.py
Last active April 15, 2023 16:32
通过You-get批量下载Bilibili合集视频
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Purpose: A simple script to download video from Bilibili
# Created: 08/07/2016
import sys
from subprocess import call
def check_and_go(args):
@Sg4Dylan
Sg4Dylan / AutoSrunWebAuth.py
Last active December 4, 2017 11:03
模拟深澜Srun系统认证(Python/Shell)
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Purpose: A simple script to complete srun's webauth
# Created: 03/01/2017
# 配合 crontab 使用
# */5 6-22 * * * /usr/bin/python3 /pathtoyourscript/LoginSrunWebAuth.py
import requests
@Sg4Dylan
Sg4Dylan / get_play_status_from_netease_music.py
Last active October 10, 2023 07:31
网易云音乐远程控制
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan -- <sg4dylan#gmail.com>
# Update: 10/13/2017
'''
透过 Chrome Debug Protocol 读取网易云音乐当前播放状态
启动播放器时附带启动参数
--remote-debugging-port=8080
@Sg4Dylan
Sg4Dylan / auto_poster.py
Last active December 4, 2017 11:01
自动糊海报工具及配置文件
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Created: 7/14/2017
from PIL import Image,ImageFont,ImageDraw
import render_config as config
def auto_poster(text: dict, param: dict):
@Sg4Dylan
Sg4Dylan / NginxAutoindexExporter.js
Last active September 15, 2021 14:35
配合 phuslu 的 autoindex,实现 nginx 自动列目录导出到 aria2
// ==UserScript==
// @name NginxAutoindexExporter
// @namespace http://tampermonkey.net/
// @version 20180915(0.2)
// @description Export link from nginx autoindex to aria2
// @author SgDylan
// @match https://example.com/*
// @grant none
// ==/UserScript==
@Sg4Dylan
Sg4Dylan / viewer_loader_0.1.8_2018-02-09.js
Last active September 12, 2023 15:09
bookwalker.com.tw online reader DRM
/**
Open Source Software Licenses
PUBLUS
Copyright(c) 2013-2014 ACCESS CO., LTD. All rights reserved.
This software includes all or part of the following open source software which is available under each license terms and conditions as follows:
* LAB.js (LABjs :: Loading And Blocking JavaScript)
v2.0.3 (c) Kyle Simpson
@Sg4Dylan
Sg4Dylan / viewer_image_0.1.8_2018-02-09.js
Last active March 25, 2024 00:18
bookwalker.com.tw online reader DRM
This file has been truncated, but you can view the full file.
/**
Open Source Software Licenses
PUBLUS
Copyright(c) 2013-2014 ACCESS CO., LTD. All rights reserved.
This software includes all or part of the following open source software which is available under each license terms and conditions as follows:
* Backbone.js 0.9.2
(c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
@Sg4Dylan
Sg4Dylan / postLiveDanmaku.py
Created September 5, 2017 13:13
简单的Bilibili直播弹幕发送实现
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Update: 9/5/2017
import requests
import ast
def sessionPool(pool_connections=2, pool_maxsize=5, max_retries=5):
session = requests.Session()
@Sg4Dylan
Sg4Dylan / bbc_broadcast.sh
Last active December 4, 2017 10:59
树莓派 FM 转播 BBC / Broadcast BBC radio via RaspberryPi / 树莓派转播网络直播音频(以 Bilibili 直播为例)
#!/bin/bash
# Raspberry broadcast fm shell
# - A believing heart is your magic -
# Dependency:
# FFmpeg: pacman -S ffmpeg
# PiFmRds: https://github.com/ChristopheJacquet/PiFmRds
# BBC Radio
# livelink="http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p"