Skip to content

Instantly share code, notes, and snippets.

View tongyifan's full-sized avatar
🕊️
Feel free to contact me

Yifan Tong tongyifan

🕊️
Feel free to contact me
  • Alibaba
  • Hangzhou, China
View GitHub Profile
@tongyifan
tongyifan / parsecookie.js
Created February 6, 2020 04:00 — forked from rendro/parsecookie.js
Parse document.cookie into object
document.cookie.split(';').map(function(c) {
return c.trim().split('=').map(decodeURIComponent);
}).reduce(function(a, b) {
try {
a[b[0]] = JSON.parse(b[1]);
} catch (e) {
a[b[0]] = b[1];
}
return a;
}, {});
@tongyifan
tongyifan / getHnRtorrents.js
Created August 26, 2020 08:15
OpenCD 个人页批量复制HnR种子下载链接(PT-Plugin-Plus插件)
/**
* PT-Plugin-Plus插件
* OpenCD 个人页批量复制HnR种子下载链接
* @author: tongyifan
* 适用页面: /userdetails.php
* 附加脚本: /schemas/NexusPHP/common.js
*
* 需要正确配置站点密钥
*/
(function () {
@tongyifan
tongyifan / u2.py
Last active September 2, 2021 01:54
U2更新种子securekey(qBittorrent)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# 0. 免责:仅在本人的qBittorrent v4.1.8上测试通过,本人不承担任何责任
# 1. 安装依赖: pip3 install requests python-qbittorrent
# 2. 修改代码开头的apikey和qbittorrent_config
# 3. 运行: python3 u2.py
# 4. 等待运行完成
import time