Commit 8d1f1c4e authored by wang's avatar wang

收集更多信息

parent cc8eefbd
...@@ -143,30 +143,33 @@ for i in range(100): ...@@ -143,30 +143,33 @@ for i in range(100):
# session = requests.Session() # session = requests.Session()
response = session.post(url, headers=headers, json=data, insecure_skip_verify=True) try:
logger.info(f'tls:{tlsV} proxy:{proxy} res:: {response.status_code}') 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) # print(response.text)
if response.status_code != 403: if response.status_code != 403:
res = db.env_shape.update_one( res = db.env_shape.update_one(
{'_id': ObjectId(selectId)}, {'_id': ObjectId(selectId)},
{"$inc": {"success": 1}} {"$inc": {"success": 1}}
) )
# proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={ # proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={
# 'type':'headerB6' # 'type':'headerB6'
# }) # })
uri = 'http://ymx-lcc.unififi.com/header/add' uri = 'http://ymx-lcc.unififi.com/header/add'
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@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
r = requests.post(uri, json={ r = requests.post(uri, json={
'brush_fromto': 'LAS-BOS', 'brush_fromto': 'LAS-BOS',
'brush_fromdate': '2023-05-26', 'brush_fromdate': '2023-05-26',
'brush_header': headers, 'brush_header': headers,
'brush_proxy':proxy, 'brush_proxy': proxy,
'brush_mode':'shopping', 'brush_mode': 'shopping',
'brush_name':'jsr', 'brush_name': 'jsr',
'brush_type':'headerB6', 'brush_type': 'headerB6',
}) })
success+=1 success += 1
logger.success(f'添加成功 {success}') logger.success(f'添加成功 {success}')
# time.sleep(3) # time.sleep(3)
except Exception as e:
print(e)
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