wayslack.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:wayslack 作者: wolever 项目源码 文件源码
def refresh(self):
        self.status_file = self.path / "status.json"
        self.status = (
            {} if not self.status_file.exists() else
            json.loads(self.status_file.open().read())
        )

        for files in self.iter_file_lists():
            for file_obj in files:
                self.archive.downloader.add_file(file_obj)
                output_dir = self.path / ts2ymd(file_obj["created"])
                if not output_dir.exists():
                    output_dir.mkdir()
                output_file = output_dir / (file_obj["id"] + ".json")
                with open_atomic(str(output_file)) as f:
                    json.dump(file_obj, f)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号