diff --git a/README.md b/README.md index 0452d3f..6538310 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@
-![STARS](https://img.shields.io/github/stars/Xtao-Labs/iShotaBot?color=yellow&label=Github%20Stars) ![Python](https://img.shields.io/badge/Python-3.9|3.8-blue)
@@ -16,7 +15,14 @@ - 解析 bilibili 视频 - 简易版问与答 -Copyright © 2021 Xtao-Labs +## 部署 + +1. 在 config.gen.ini 中设置 api_id , api_hash +2. 复制 config.gen.ini 为 config.ini +3. 使用 pip 从 requirements 安装所需库 +4. ```python3 main.py``` + +Copyright © 2021-2022 Xtao-Labs # IDE diff --git a/defs/anti_channel.py b/defs/anti_channel.py index a40415b..ad09a60 100644 --- a/defs/anti_channel.py +++ b/defs/anti_channel.py @@ -1,10 +1,12 @@ import pickle -from os import sep +from os import sep, mkdir from os.path import exists def init() -> None: data = {} + if not exists("data"): + mkdir("data") if not exists(f"data{sep}anti_channel.pkl"): with open(f"data{sep}anti_channel.pkl", "wb") as f: pickle.dump(data, f, pickle.HIGHEST_PROTOCOL)