Commit 90d5d086 authored by wang's avatar wang

wn test

parent 65f10cb6
...@@ -58,6 +58,7 @@ headers = { ...@@ -58,6 +58,7 @@ headers = {
success = 0 success = 0
total = 0 total = 0
token = ''
while True: while True:
r = requests.get('http://ymx-lcc.unififi.com/header/task/pull/headerB6?brush_name=test') r = requests.get('http://ymx-lcc.unififi.com/header/task/pull/headerB6?brush_name=test')
if platform.uname().system != 'Darwin': if platform.uname().system != 'Darwin':
...@@ -98,7 +99,6 @@ while True: ...@@ -98,7 +99,6 @@ while True:
selectId = random.choice(list(envs)) selectId = random.choice(list(envs))
# selectId = 'a74b38e7115cf4d1b1f6976c' # selectId = 'a74b38e7115cf4d1b1f6976c'
if usedTime > 5: if usedTime > 5:
c = session.get('https://www.jetblue.com/js/src/jb-74873.js', insecure_skip_verify=True).text c = session.get('https://www.jetblue.com/js/src/jb-74873.js', insecure_skip_verify=True).text
m5 = md5(c) m5 = md5(c)
...@@ -133,14 +133,14 @@ while True: ...@@ -133,14 +133,14 @@ while True:
with open('js_dom_run1.js', 'w', encoding='utf-8') as f: with open('js_dom_run1.js', 'w', encoding='utf-8') as f:
f.write(code1 + '\n\n' + c) f.write(code1 + '\n\n' + c)
t1 = time.time() t1 = time.time()
token = list(db.token_shape.aggregate( [ {'$match': {'update_time':{'$gte': int(time.time() * 1000) - 60*60*12}}}, { '$sample': { 'size': 1 } } ] ))[0]['_id'] # token = list(db.token_shape.aggregate( [ {'$match': {'update_time':{'$gte': int(time.time() * 1000) - 60*60*12}}}, { '$sample': { 'size': 1 } } ] ))[0]['_id']
# token = '11' # token = '11'
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message'] # r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json() # r = requests.get('http://127.0.0.1:3001').json()
p = subprocess.Popen(['node', 'js_dom_run1.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'js_dom_run1.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run1.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'src_run1.js', selectId, '11', token], 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 = ''
......
No preview for this file type
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