Commit 72428c7b authored by wang's avatar wang

适配不同版本 chrome

parent 1d40afe5
......@@ -91,8 +91,8 @@ for i in range(100):
t1 = time.time()
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# 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', 'src_run_chrome_105.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_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,
stderr=subprocess.PIPE)
......@@ -103,7 +103,7 @@ for i in range(100):
if p.returncode == 0:
tmp = output.decode().split('\n')[-2]
else:
raise Exception("执行js失败")
raise Exception(selectId)
r = json.loads(tmp)
res = db.env_shape.update_one(
{'_id': ObjectId(selectId)},
......@@ -114,6 +114,7 @@ for i in range(100):
headers.update(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 {headers['X-1ItxWO9i-a'.lower()]}")
url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data = {
"tripType": "oneWay",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -65,7 +65,7 @@ let sid = process.argv[2] || 'a74b38e7115cf4d1b1f6976c';
if (process.argv[3]){
console.log = function(){}
}
// sid = 'b23a384acc5b644691d1cd01'
// sid = "b93e97591189a5841d0288ba"
let ENV = ENVS[sid]
......@@ -8428,8 +8428,8 @@ let aa = false;
window.TouchEvent = TouchEvent
if (ENV.navigatorparams.useragent.indexOf('Firefox') > -1){
// if (1===1){
// if (ENV.navigatorparams.useragent.indexOf('Firefox') > -1){
if (1===1){
window.netscape = {}
}else{
window.TouchEvent = TouchEvent
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