Pages
下载 blob 的加密视频 一般 F12 搜索 m3u8 可以得到两个结果,从中可以获得 iv,key 加密方式和视频分片地址 # 下载视频为 video_1.ts 到 video_90.ts for i in $(seq 1 90); do openssl aes-128-cbc -d -in "video_${i}.ts" -out dvideo_${i}.ts -nosalt -iv c4eb1e72546a38bdfd2c5178573b5548 -K 6c456399c30ae4c931e3c8f5f2970789 done
闭包 package main import "fmt" func main() { my_counter := counter() fmt.Println(my_counter()) fmt.Println(my_counter()) fmt.Println(my_counter()) } func counter() func() int { i := 0 return func() int { i++ return i } } 数组和切片 // 数组表示一个具有固定长度的序列 var arr = [5]int{1, 2, 3, 4, 5} var arr1 = [...]int{1, 2, 3, 4, 5} // 切片表示
Snappy 压缩文本 安装 sudo apt-get install libsnappy-dev pip install python-snappy 使用 压缩文件 # compress python -m snappy -c uncompressed_file compressed_file.snappy # uncompress python -m snappy -d compressed_file.snappy uncompressed_file 压缩字符串 import snappy byte_data = snappy.snappy.compress(str_data) str_data = snappy.snappy.decompress(byte_data)
安装 用于用 html 或 xml 字符串中提取数据 pip install bs4 使用 例如已经获得一下字符串 <html> <head> <title> The Dormouse's story </title> </head> <body> <p class="title"> <b> The Dormouse's story </b> </p> <p class="story"> Once upon a time there were three little sisters; and their names were <a class="sister" href="http://example.com/elsie" id="link1"> Elsie </a> , <a class="sister" href="http://example.com/lacie" id="link2">