标签:webkit sele ima class lang use htm selenium status
需要安装linux 字体
try:
if not check_url:
url_list = [
# "https://www.google.com",
# "https://www.youtube.com/",
"https://www.baidu.com/",
# "https://www.360.cn/",
# "http://ip.3322.org/"
# "https://www.lazada.co.id"
]
check_url = random.choice(url_list)
headers = {
# ‘User-Agent‘: random.choice(pc_user_agent_list)
‘User-Agent‘: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36‘
}
response = requests.get(check_url, headers=headers, proxies=proxies, timeout=3)
if response.status_code == 200:
# print(response.status_code)
return True
except Exception as e:
return False
```
标签:webkit sele ima class lang use htm selenium status
原文地址:https://www.cnblogs.com/gqv2009/p/12556475.html