Commit 72428c7b authored by wang's avatar wang

适配不同版本 chrome

parent 1d40afe5
...@@ -91,8 +91,8 @@ for i in range(100): ...@@ -91,8 +91,8 @@ for i in range(100):
t1 = time.time() t1 = time.time()
# 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_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'js_dom_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run_chrome_105.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_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
...@@ -103,7 +103,7 @@ for i in range(100): ...@@ -103,7 +103,7 @@ for i in range(100):
if p.returncode == 0: if p.returncode == 0:
tmp = output.decode().split('\n')[-2] tmp = output.decode().split('\n')[-2]
else: else:
raise Exception("执行js失败") raise Exception(selectId)
r = json.loads(tmp) r = json.loads(tmp)
res = db.env_shape.update_one( res = db.env_shape.update_one(
{'_id': ObjectId(selectId)}, {'_id': ObjectId(selectId)},
...@@ -114,6 +114,7 @@ for i in range(100): ...@@ -114,6 +114,7 @@ for i in range(100):
headers.update(r) headers.update(r)
# headers = r # headers = r
logger.info(f"success:{success} {(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}") logger.info(f"success:{success} {(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}")
logger.info(f"success:{success} {(time.time() - t1) *1000:.3f}ms {headers['X-1ItxWO9i-a'.lower()]}")
url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS" url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data = { data = {
"tripType": "oneWay", "tripType": "oneWay",
......
This diff is collapsed.
This diff is collapsed.
...@@ -65,7 +65,7 @@ let sid = process.argv[2] || 'a74b38e7115cf4d1b1f6976c'; ...@@ -65,7 +65,7 @@ let sid = process.argv[2] || 'a74b38e7115cf4d1b1f6976c';
if (process.argv[3]){ if (process.argv[3]){
console.log = function(){} console.log = function(){}
} }
// sid = 'b23a384acc5b644691d1cd01'
// sid = "b93e97591189a5841d0288ba" // sid = "b93e97591189a5841d0288ba"
let ENV = ENVS[sid] let ENV = ENVS[sid]
...@@ -8428,8 +8428,8 @@ let aa = false; ...@@ -8428,8 +8428,8 @@ let aa = false;
window.TouchEvent = TouchEvent window.TouchEvent = TouchEvent
if (ENV.navigatorparams.useragent.indexOf('Firefox') > -1){ // if (ENV.navigatorparams.useragent.indexOf('Firefox') > -1){
// if (1===1){ if (1===1){
window.netscape = {} window.netscape = {}
}else{ }else{
window.TouchEvent = TouchEvent window.TouchEvent = TouchEvent
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