request请求https时禁用安全请求警告
2017-07-27 19:14
225 查看
def getPhoneLocatin(): match=re.compile(ur".*?province:'(.*?)'.*") temp=[] for phone in loadData(): realphone=phone if len(str(phone).strip())>11: phone=str(phone).strip()[:11] try: from requests.packages.urllib3.exceptions import InsecureRequestWarning # 禁用安全请求警告 requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
#verify=False禁用证书 response=requests.get(url='http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=%s'%phone,verify=False) search=match.search(response.content.decode('gbk')) location='' if search: location=search.group(1) temp.append((realphone,location)) if len(temp)>=5000: cursor.executemany(sql,temp) print '..' conn.commit() temp=[] except Exception as e: pass
相关文章推荐
- C#模拟Https请求时出现 基础连接已经关闭 未能为 SSLTLS 安全通道建立信任关系
- C# HttpWebRequest GET HTTP HTTPS 请求
- python爬虫遇到https站点InsecureRequestWarning警告解决方案
- 【Https】Spring RestTemplete支持Https安全请求
- iOS HTTPS安全请求 验证服务器返回的证书
- 用httpWebRequest调用https开头的php webservice,报“基础连接已经关闭: 未能为SSL/TLS 安全通道建立信任关系”错误的解决方法
- iOS ASIHTTPRequest用https协议加密请求
- C# HttpWebRequest GET HTTP HTTPS 请求
- C# HttpWebRequest GET HTTP HTTPS 请求
- 在C#用HttpWebRequest中发送GET/HTTP/HTTPS请求
- DEDECMS安全警告:Safe Alert: Request Error step 2!
- validateRequest=false 可以禁用请求验证
- ASIHttpRequest请求HTTPS
- C#中用HttpWebRequest中发送GET/HTTP/HTTPS请求
- 在C#用HttpWebRequest中发送GET/HTTP/HTTPS请求
- 警告:为了安全请不要随意将ASP.Net的validateRequest="false"
- BLE 协议:从端安全请求 Slave Security Request
- 配置https实现请求安全
- iOS9 HTTPS请求: AFNetworking2安全的使用自签证书访问HTTPS
- 警告:为了安全请不要随意将ASP.Net的validateRequest="false"