• urllib库在python2和python3环境下的使用区别


    好东西啊!!!

    Python 2 name Python 3 name
    urllib.urlretrieve() urllib.request.urlretrieve()
    urllib.urlcleanup() urllib.request.urlcleanup()
    urllib.quote() urllib.parse.quote() 
    urllib.quote_plus() urllib.parse.quote_plus()
    urllib.unquote() urllib.parse.unquote()
    urllib.unquote_plus() urllib.parse.unquote_plus()
    urllib.urlencode() urllib.parse.urlencode()
    urllib.pathname2url() urllib.request.pathname2url()
    urllib.url2pathname() urllib.request.url2pathname()
    urllib.getproxies() urllib.request.getproxies()
    urllib.URLopener urllib.request.URLopener 
    urllib.FancyURLopener urllib.request.FancyURLopener
    urllib.ContentTooShortError urllib.error.ContentTooShortError
    urllib2.urlopen() urllib.request.urlopen()
    urllib2.install_opener() urllib.request.install_opener()
    urllib2.build_opener() urllib.request.build_opener()
    urllib2.URLError urllib.error.URLError
    urllib2.HTTPError urllib.error.HTTPError
    urllib2.Request urllib.request.Request
    urllib2.OpenerDirector urllib.request.OpenerDirector
    urllib2.BaseHandler urllib.request.BaseHandler
    urllib2.HTTPDefaultErrorHandler urllib.request.HTTPDefaultErrorHandler
    urllib2.HTTPRedirectHandler urllib.request.HTTPRedirectHandler
    urllib2.HTTPCookieProcessor urllib.request.HTTPCookieProcessor
    urllib2.ProxyHandler urllib.request.ProxyHandler
    urllib2.HTTPPasswordMgr urllib.request.HTTPPasswordMgr
    urllib2.HTTPPasswordMgrWithDefaultRealm urllib.request.HTTPPasswordMgrWithDefaultRealm
    urllib2.AbstractBasicAuthHandler urllib.request.AbstractBasicAuthHandler
    urllib2.HTTPBasicAuthHandler urllib.request.HTTPBasicAuthHandler
    urllib2.ProxyBasicAuthHandler urllib.request.ProxyBasicAuthHandler
    urllib2.AbstractDigestAuthHandler urllib.request.AbstractDigestAuthHandler
    urllib2.HTTPDigestAuthHandler urllib.request.HTTPDigestAuthHandler
    urllib2.ProxyDigestAuthHandler urllib.request.ProxyDigestAuthHandler
    urllib2.HTTPHandler urllib.request.HTTPHandler
    urllib2.HTTPSHandler urllib.request.HTTPSHandler
    urllib2.FileHandler urllib.request.FileHandler
    urllib2.FTPHandler urllib.request.FTPHandler
    urllib2.CacheFTPHandler urllib.request.CacheFTPHandler 
    urllib2.UnknownHandler urllib.request.UnknownHandler
     

    原文:https://blog.csdn.net/whatday/article/details/54710403

  • 相关阅读:
    3个检测浏览器UserAgent信息的网站
    linux系统下配置网桥(CentOS 5.5)
    squid封禁不带UserAgent的请求
    iptables透明网桥无法使用透明代理错误
    Squid修改用户浏览器的Useragent信息
    MySQL主从复制(MasterSlave)与读写分离(MySQLProxy)实践
    js中格式化时间
    js获取当前月的第一天和最后一天
    JS String.toDate
    Js获取当前日期时间及其它操作
  • 原文地址:https://www.cnblogs.com/zhangtianyuan/p/9473497.html
Copyright © 2020-2023  润新知