Commit 87beb73c authored by wang's avatar wang

ws 测试

parent 1e2234bb
...@@ -6,7 +6,8 @@ import subprocess ...@@ -6,7 +6,8 @@ import subprocess
import time import time
import os import os
import traceback import traceback
import urllib3
urllib3.disable_warnings()
import loguru import loguru
import requests import requests
import json import json
...@@ -88,13 +89,6 @@ headers = { ...@@ -88,13 +89,6 @@ headers = {
"Origin": "https://www.westjet.com", "Origin": "https://www.westjet.com",
"Pragma": "no-cache", "Pragma": "no-cache",
"Referer": "https://www.westjet.com/", "Referer": "https://www.westjet.com/",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-site",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\""
} }
# tlss = [ 'chrome_103', 'chrome_104', 'chrome_105', 'chrome_106', # tlss = [ 'chrome_103', 'chrome_104', 'chrome_105', 'chrome_106',
# 'firefox_102', 'firefox_104' # 'firefox_102', 'firefox_104'
...@@ -149,11 +143,11 @@ while True: ...@@ -149,11 +143,11 @@ while True:
'http': proxy, 'http': proxy,
'https': proxy, 'https': proxy,
} }
# session.verify = False session.verify = False
if platform.uname().system == 'Darwin': if platform.uname().system == 'Darwin':
session.proxies = { session.proxies = {
'http': 'http://127.0.0.1:7890', 'http': 'http://127.0.0.1:8890',
'https': 'http://127.0.0.1:7890', 'https': 'http://127.0.0.1:8890',
} }
......
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