init xiaoxiang project

This commit is contained in:
2026-04-15 18:12:30 +08:00
commit f539f1bece
160 changed files with 981970 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from pathlib import Path
import json
root = Path(r"c:\Users\Administrator\PycharmProjects\pythonProject\小象超市\获取数据清洗\进口水果商品数据编号195")
for sub in sorted(root.iterdir(), key=lambda p: int(p.name) if p.name.isdigit() else p.name):
if not sub.is_dir():
continue
body = sub / "response_body.json"
if not body.is_file():
continue
with body.open(encoding="utf-8") as f:
data = json.load(f)
print(data)