Commit b7b90cfe authored by wang's avatar wang

111

parent c494939a
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -302,17 +302,18 @@ setTimeout(r=> { ...@@ -302,17 +302,18 @@ setTimeout(r=> {
# f.write(code + '\n\n' + get_random_location() + ';;' + c) # f.write(code + '\n\n' + get_random_location() + ';;' + c)
code1 = open('js_dom_run.js','r').read() code1 = open('js_dom_run.js','r').read()
# 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()
logger.info("start execute js")
# 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,
logger.info("start execute js")
p = subprocess.Popen(['node', 'src_run1.js', selectId, '11', token, proxy], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'src_run1.js', selectId, '11', token, proxy], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
output, err = p.communicate(timeout=10) output, err = p.communicate(timeout=10)
...@@ -328,8 +329,8 @@ setTimeout(r=> { ...@@ -328,8 +329,8 @@ setTimeout(r=> {
# ) # )
usedTime += 1 usedTime += 1
# print(r) # print(r)
xhr_url = r.pop('xhr_url') # xhr_url = r.pop('xhr_url')
xhr_res = r.pop('xhr_res') # xhr_res = r.pop('xhr_res')
# print('xhr_url', xhr_url) # print('xhr_url', xhr_url)
# print('xhr_res', xhr_res) # print('xhr_res', xhr_res)
headers.update(r) headers.update(r)
......
No preview for this file type
This diff is collapsed.
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