zoukankan      html  css  js  c++  java
  • python 3 requests库2个问题

    1.问题描述:
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='passport.cnblogs.com', port=443): Max retries exceeded with url: /user/signin (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强 迫关闭了一个现有的连接。', None, 10054, None)))
    解决方案:
    import os
    os.environ['NO_PROXY'] = 'stackoverflow.com'

    2问题描述:
    C:Python37libsite-packagesurllib3connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    解决方案:
    在导包时加入如下两行,取消警报
    import requests
    from requests.packages.urllib3.exceptions import InsecureRequestWarning
    requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

  • 相关阅读:
    最小生成树算法
    并查集
    背包问题
    木桶排序
    STL之vector
    STL中的queue用法与stack用法对比
    快速幂求模
    归并排序+典型例题(逆序对)
    负进制转换
    冒泡排序
  • 原文地址:https://www.cnblogs.com/lisa2016/p/12568808.html
Copyright © 2011-2022 走看看