urllib

Python2 name Python3 name
urllib.urlopen() Deprecated. See urllib.request.urlopen() which mirrorsurllib2.urlopen() 
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

python2 与 python3 urllib的互相对应关系的更多相关文章

  1. Python2 和Python3 的差异总结

    一.基本语法差异 1.1 核心类差异 Python3对Unicode字符的原生支持 Python2中使用 ASCII 码作为默认编码方式导致string有两种类型str和unicode,Python3 ...

  2. Python2和Python3的差异

    之前做Spark大数据分析的时候,考虑要做Python的版本升级,对于Python2和Python3的差异做了一个调研,主要对于语法和第三方工具包支持程度进行了比较. 基本语法差异 核心类差异 Pyt ...

  3. python2和python3的区别(转)

    基本语法差异 核心类差异 Python3对Unicode字符的原生支持 Python2中使用 ASCII 码作为默认编码方式导致string有两种类型str和unicode,Python3只支持uni ...

  4. python2与python3的区别齐全【整理】

    本文链接:https://blog.csdn.net/pangzhaowen/article/details/80650478 展开 一.核心类差异1. Python3 对 Unicode 字符的原生 ...

  5. 详解:Python2中的urllib、urllib2与Python3中的urllib以及第三方模块requests

    在python2中,urllib和urllib2都是接受URL请求的相关模块,但是提供了不同的功能.两个最显著的不同如下: 1.urllib2可以接受一个Request类的实例来设置URL请求的hea ...

  6. Python2和Python3中urllib库中urlencode的使用注意事项

    前言 在Python中,我们通常使用urllib中的urlencode方法将字典编码,用于提交数据给url等操作,但是在Python2和Python3中urllib模块中所提供的urlencode的包 ...

  7. python3.x 和 python2.x关于 urllib的用法

    在python2.x版本中可以直接使用import urllib来进行操作,但是python3.x版本中使用的是import urllib.request来进行操作,下面是简单的例子: python2 ...

  8. Python2 Python3 urllib方法对应

    Python2 name Python3 nameurllib.urlopen() urllib.request.urlopen()urllib2.urlopen() urllib.request.u ...

  9. Python2中的urllib、urllib2和 Python3中的urllib、requests

    目录 Python2.x中 urllib和urllib2 常用方法和类 Python3.x中 urllib requests Python2.x中 urllib和urllib2 urllib 和 ur ...

随机推荐

  1. hdu 1503, LCS variants, find a LCS, not just the length, backtrack to find LCS, no extra markup 分类: hdoj 2015-07-18 16:24 139人阅读 评论(0) 收藏

    a typical variant of LCS algo. the key point here is, the dp[][] array contains enough message to de ...

  2. 再读C++线程池

    最近仔细看了一下https://github.com/henkel/threadpool代码,总体感觉非常精巧,使用了 boost库的bind function完成了线程池与业务端的完全解耦:所有的任 ...

  3. POJ 题目1141 Brackets Sequence(区间DP记录路径)

    Brackets Sequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 27793   Accepted: 788 ...

  4. POJ 题目3280 Cheapest Palindrome(区间DP)

    Cheapest Palindrome Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7148   Accepted: 34 ...

  5. 使用jQuery实现点击左右滑动切换特效

    使用jQuery实现点击左右滑动切换特效: HTML代码如下: <!--整体背景div--> <div class="warp"> <!--中间内容d ...

  6. My97DatePicker的使用

    一. 简介 1. 简介 目前的版本是:4.8 2. 注意事项 My97DatePicker目录是一个整体,不可破坏里面的目录结构,也不可对里面的文件改名,可以改目录名 My97DatePicker.h ...

  7. SQL GROUP BY 中的TOP N

    一个示例表test(select * from test): id gid    age    username1 1      11     zhangsan2 1      13     zhan ...

  8. iOS应用性能调优好文mark

    http://www.cocoachina.com/ios/20150408/11501.html

  9. HDU 5386 暴力

    题目 也是个坑题,可惜没有发现这是个水题,被矩阵的气势吓住了,其实后来做出来的人挺多,就应该想到没那么难了.(两个队友陷入DP无法自拔,没有想换题的打算). 题意:告诉初始矩阵,目的矩阵,告诉n个步骤 ...

  10. (zhuan)Python 虚拟环境:Virtualenv

    Python 虚拟环境:Virtualenv zhuanzi: http://liuzhijun.iteye.com/blog/1872241 virtualenv virtualenv用于创建独立的 ...