Commit 61f1a3dd authored by wang's avatar wang

适配不同版本 chrome

parent 1ac5b2c6
......@@ -60,11 +60,13 @@ selectId = random.choice(list(envs))
code = open('src.js', 'r', encoding='utf-8').read()
code1 = open('js_dom_run.js', 'r', encoding='utf-8').read()
for i in range(100):
selectId = random.choice(list(envs))
proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
# proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@198.147.25.26:{int(random.randint(10000, 11149))}'
proxy = 'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
if platform.uname().system == 'Darwin':
proxy = 'http://127.0.0.1:7890'
proxy = 'http://127.0.0.1:8890'
tlsV = f'chrome_{random.randint(105, 113)}'
tlsV = 'chrome_114'
session = tls_client.Session(tlsV)
......@@ -72,14 +74,14 @@ for i in range(100):
'http': proxy,
'https': proxy,
}
# selectId = 'a74b38e7115cf4d1b1f6976c'
c = session.get('https://www.jetblue.com/js/src/jb-74873.js').text
c = session.get('https://www.jetblue.com/js/src/jb-74873.js', insecure_skip_verify=True).text
m5 = md5(c)
if m5 != lastHash and usedTime > 2:
lastHash = m5
usedTime = 0
logger.debug('js变化')
selectId = random.choice(list(envs))
code = open('src.js', 'r', encoding='utf-8').read()
code1 = open('js_dom_run.js', 'r', encoding='utf-8').read()
with open('src_run1.js', 'w', encoding='utf-8') as f:
......@@ -141,7 +143,7 @@ for i in range(100):
# session = requests.Session()
response = session.post(url, headers=headers, json=data)
response = session.post(url, headers=headers, json=data, insecure_skip_verify=True)
logger.info(f'tls:{tlsV} proxy:{proxy} res:: {response.status_code}')
# print(response.text)
......
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
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