Commit 54392b2a authored by wang's avatar wang

ws 测试

parent 3d1dbe79
......@@ -36,17 +36,18 @@ db = client.env
def get_random_one():
query = {
'env.funcs': {'$ne': None},
'env.fontsres': {'$ne': None},
'env.matchmedias': {'$ne': None},
'env.navigatorparams.platform': 'MacIntel',
# 'env.navigatorparams.platform': 'Win32',
"env.navigatorparams.vendor": "Google Inc.",
'env.useragentdata.highvalue.uafullversion': {'$ne': ""}
'env.fontsres': {'$ne': None},
'env.matchmedias': {'$ne': None},
'env.navigatorparams.platform': 'MacIntel',
# 'env.navigatorparams.platform': 'Win32',
"env.navigatorparams.vendor": "Google Inc.",
'env.useragentdata.highvalue.uafullversion': {'$ne': ""}
}
res = list(db.env_shape.aggregate([
{'$match': query},
{'$sample': {'size': 1}}
{'$sample': {'size': 1}},
{'$sort': {'updatetime': 1}}
]))
path = f'/tmp/{str(res[0]["_id"])}'
with open(path, 'w') as f:
......
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