Commit 91f5648b authored by wang's avatar wang

收集更多信息

parent ef41556a
This diff is collapsed.
...@@ -25,10 +25,10 @@ client = MongoClient('mongodb://lcc-spider:JIUsfhiad&^@18.144.59.80:27017/?authS ...@@ -25,10 +25,10 @@ client = MongoClient('mongodb://lcc-spider:JIUsfhiad&^@18.144.59.80:27017/?authS
db = client.env db = client.env
# 查询所有文档 # 查询所有文档
# result = db.env_shape.find({'env.navigatorparams.useragent':{'$regex': 'Firefox'}}) # result = db.env_shape.find({'env.funcs' :{'$ne': None}})
# data = {str(x['_id']): x['env'] for x in result} # data = {str(x['_id']): x['env'] for x in result}
# print(result) # print(result)
# with open('ff.json', 'w', encoding='utf-8') as f: # with open('env.json', 'w', encoding='utf-8') as f:
# f.write(json.dumps(data)) # f.write(json.dumps(data))
with open('env.json', 'r', encoding='utf-8') as f: with open('env.json', 'r', encoding='utf-8') as f:
data = json.loads(f.read()) data = json.loads(f.read())
...@@ -96,8 +96,6 @@ for i in range(100): ...@@ -96,8 +96,6 @@ for i in range(100):
# p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'src_run1.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'src_run1.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
output, err = p.communicate(timeout=10) output, err = p.communicate(timeout=10)
tmp = '' tmp = ''
if p.returncode == 0: if p.returncode == 0:
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
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