Commit 04884f77 authored by wang's avatar wang

收集更多信息

parent 31597491
......@@ -25,11 +25,11 @@ def md5(text):
client = MongoClient('mongodb://lcc-spider:JIUsfhiad&^@18.144.59.80:27017/?authSource=admin&directConnection=true')
db = client.env
# 查询所有文档
# result = db.env_shape.find({'env.funcs' :{'$ne': None}})
# data = {str(x['_id']): x['env'] for x in result}
# print(result)
# with open('env.json', 'w', encoding='utf-8') as f:
# f.write(json.dumps(data))
result = db.env_shape.find({'env.funcs' :{'$ne': None}})
data = {str(x['_id']): x['env'] for x in result}
print(result)
with open('env.json', 'w', encoding='utf-8') as f:
f.write(json.dumps(data))
with open('env.json', 'r', encoding='utf-8') as f:
data = json.loads(f.read())
envs = data.keys()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment