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. Unity3d之个性化皮肤

    1.首先创建皮肤,贴图 2.在代码中定义public GUISkin变量,在Inspector中赋值 3.在OnGUI中调用 GUI.skin = mySkin; GUI.Button(new Rec ...

  2. JavaScript中style, currentStyle和 getComputedStyle的异同

    今天在做项目的时候,习惯性的用到了element.style.width,然而浏览器却报错,错误提示是style is undefined,这是我才意识到,内联样式表和外联样式表在js应用中也有很大的 ...

  3. 3D几何变换

    3D点:非齐次坐标x(x,y,z) (x表示向量矢量) 齐次坐标:x~=(x~,y~,z~,w~)=w~(x,y,z,1)=w~x~         增广矢量:x—=(x,y,z,1) w~=0时,齐 ...

  4. Multiple View Geometry in Computer vision 1.1节部分翻译

    1.1简介—无处不在的投影几何 我们都熟悉射影变换.当我们看一幅图,我们看到的方形不是方形,或圆形不是圆形.平面立体映射到图片上的变换是一个投影变换的例子. 因此投影变换时保留的几何属性是什么呢?当然 ...

  5. 使用命令行工具运行Xcode 7 UI Tests

    原文:Run Xcode 7 UI Tests from the command line 苹果在Xcode 7中引入了一项新技术UI Tests,允许开发者使用Swift或Objective C代码 ...

  6. 弹性盒子之wap端布局

    发现移动端用弹性盒子布局起来更加的方便,box-flex:val;特别是图文展示的时候,如下面的 <!DOCTYPE html> <html> <head> < ...

  7. jQuery专题

    jQuery概述 ·为了简化JavaScript的开发,一些JavaScript库诞生了.JavaScript库封装了很多预定义的对象和实用函数.能帮助使用者建立有高难度交互的Web2.0特性的富客户 ...

  8. jdk 编译器 对final字段的处理

    class FinalTest{     void a(){         final int i=10;         int j=10;     } }            stack=2, ...

  9. list排序

    今天要对List排序,上网查了很多方法都感觉比较麻烦,现在终于找到了两种比较简便的方式,在此写出来,防止忘记!同时供大家参考! using System; using System.Collectio ...

  10. C++ Daily 《6》---- 类静态对象与函数静态对象

    C++ 的一个哲学基础是,你不应该为你使用的东西付出代价. class 拥有一个 static 成员,即使从未被用到,它也会被构造和析构: 而 函数拥有一个 static 成员, 如果这个函数从未被调 ...