当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 90

Gingerbread/抖音爬虫
关闭

forked from 二毛/抖音爬虫 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test.py 464 Bytes
一键复制 编辑 原始数据 按行查看 历史
二毛 提交于 2023-05-21 12:13 . base
import json
import time
import ujson
def benchmark(name, dump, load):
start = time.time()
for i in range(1000):
with open('1.json', 'r', encoding='utf-8') as f:
m = load(f)
with open('1.json', 'w', encoding='utf-8') as f:
dump(m, f, ensure_ascii=False)
print(name, time.time() - start)
if __name__ == "__main__":
benchmark("Python", json.dump, json.load)
benchmark("ujson", ujson.dump, ujson.load)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/jiangbin216/douyin.git
git@gitee.com:jiangbin216/douyin.git
jiangbin216
douyin
抖音爬虫
v3

搜索帮助

D67c1975 1850385 1daf7b77 1850385