import os
import re
import urllib.parse
import requests
def mkdir(pathStr):
# 去除首位空格
path = pathStr.strip()
# 判断路径是否存在,True表示存在,False表示不存在
isExists = os.path.exists(path)
# 判断结果
if not isExists:
# 如果不存在则创建目录
os.makedirs(path)
print(path + " 创建成功")
def demo():
# 类型列表
typeList = [
"类型一",
"类型二",
"类型三",
]
# 群名字典(群中文名:roomId)
d = {
"数据来源一": "wrk2wxDgAAySr4bL8SRXI2qZK_YiBwEA",
"数据来源二": "wrk2wxDgAAxVMoIF7-ImPw-WehYS4mPw",
}
for index in range(len(typeList)):
keyWord = urllib.parse.quote(typeList[index])
parentPath = "E:\\file\\" + str(index) + "_" + typeList[index]
mkdir(parentPath)
for key in d:
# 获取数据列表
url = (
"http://127.0.0
还没有评论,来说两句吧...