Skip to content

Instantly share code, notes, and snippets.

@Xzonn
Xzonn / bvtest.py
Created March 24, 2020 10:59 — forked from abc1763613206/bvtest.py
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
import struct
import re
import random
import json
import os
import time
from PIL import Image, ImageDraw, ImageFont
from pngToBin import getPointSequence
with open("../main.gzf", "rb") as f:
import math
def ZOrderX(tileSize, count):
div = tileSize // 2;
x_in = count // div & div;
while div > 1:
div = div // 2;
x_in |= count // div & div;
return x_in;
import os
import struct
walk = os.walk("./")
data = {}
for root, dirs, files in walk:
for fileName in files:
fullName = os.path.join(root, fileName)
// ==UserScript==
// @id CNKI-PDF-Special
// @name CNKI 中国知网 PDF 全文下载(特制版)
// @version 3.2.0.20170210
// @namespace http://yuelong.info
// @author YUE Long
// @description 参见 http://blog.yuelong.info/post/cnki-pdf-js.html
// @include http://*.cnki.net/*
// @include http://*.cnki.net.*/*
// @exclude http://image.cnki.net/*
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
import datetime
import json
import os
import requests
os.chdir(os.path.dirname(__file__))
@Xzonn
Xzonn / extract_ptd.py
Created October 3, 2020 05:51 — forked from NWPlayer123/extract_ptd.py
Astral Chain PTD text
#Forked from NWPlayer123/extract_ptd.py
#thanks Simon for being a smartie
#unfinished, need to parse all the tables
#string_offset starts at +0x20 (header)
from struct import unpack
import sys
sys.argv.append("Hud_text_CNzh.bin")
def read16(f):
return unpack("<H", f.read(2))[0]
import os
import xml.dom.minidom as xmldom
w = os.walk("./")
f = open("export.txt", "w", 1024 * 16, "utf-8")
for root, dirs, files in w:
for file in files:
if file.endswith(".kup"):
dom = xmldom.parse(os.path.join(root, file))
@Xzonn
Xzonn / World's End Club - Extract Text.py
Created May 8, 2021 17:02
This script can be used to extract text content from <World's End Club>.
# This script can be used to extract text content from <World's End Club>.
# You should firstly extract ".bin" files from your game, by tools such as AssetStudioGUI.
import os
import struct
def padFile(f):
return f.seek((f.tell() + 3) // 4 * 4)
def readString(f):
@Xzonn
Xzonn / .gitignore
Last active June 10, 2021 06:37
FixPageLinkNames
MediaWiki.py
Data.py
__pycache__
in.txt
out.txt