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. 场景3 Data Management

    场景3 Data Management 数据管理 性能优化 OLTP OLAP 物化视图 :表的快照 传输表空间 :异构平台的数据迁移 星型转换 :事实表 OLTP : 在线事务处理 1. trans ...

  2. 006-Map、Tuple、Zip实战解析

    006-Map.Tuple.Zip实战解析 实战代码 Map实战 本身是映射,映射关系在实际中应用非常广泛,比如:配置信息都是Key-Value形式 键值对不存在下边关系 是一个immutable(不 ...

  3. 生成模型(Generative)和判别模型(Discriminative)

    生成模型(Generative)和判别模型(Discriminative) 引言    最近看文章<A survey of appearance models in visual object ...

  4. Web前端开发的前景与用处

    随着时代的发展,现在从事IT方向的人有很多,所以励志要成为前端开发工程师的人有很多.当然也有很多人在犹豫不知道该从事哪个方向,我今天就是来给大家分析一下Web前端开发的前景.包括工作内容,发展前景和薪 ...

  5. Fragment的使用(一)

    本篇博客主要讲的是如何使用Fragment. 使用Fragment的步骤类似于自定义View的步骤: 定义Fragment的布局文件 实现扩展Fragment的子类 在扩展子类的onCreateVie ...

  6. poj1847 最短路

    //Accepted 188 KB 32 ms //spfa 最短路 //每个intersection到第一个连接点是不要switch的 //到其他的intersection要switch一次 #in ...

  7. vs2008下面wince错误MSDiscoCodeGenerator

    引用webservice时候错误.网上也有很多解决方法,各不相同. 不多说了. 打开vs2008安装包 找到wcu目录下面有个NetCF 目录: 下面的NetCFSetupv2.msi,NetCFSe ...

  8. array_filter函数

    利用array_filter函数轻松去掉多维空值,而数组的下标没有改变, 如果自定义过滤函数返回 true,则被操作的数组的当前值就会被包含在返回的结果数组中, 并将结果组成一个新的数组.如果原数组是 ...

  9. ubuntu 15.10 install nvidia driver

    先添加源sudo add-apt-repository ppa:graphics-drivers/ppa 更新一下:sudo apt-get update (附原始链接:http://www.omgu ...

  10. C++深拷贝与浅拷贝

    当用一个已初始化过了的自定义类类型对象去初始化另一个新构造的对象的时候,拷贝构造函数就会被自动调用.也就是说,当类的对象需要拷贝时,拷贝构造函数将会被调用.以下情况都会调用拷贝构造函数: (1)一个对 ...