python2 与 python3 urllib的互相对应关系
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的互相对应关系的更多相关文章
- Python2 和Python3 的差异总结
一.基本语法差异 1.1 核心类差异 Python3对Unicode字符的原生支持 Python2中使用 ASCII 码作为默认编码方式导致string有两种类型str和unicode,Python3 ...
- Python2和Python3的差异
之前做Spark大数据分析的时候,考虑要做Python的版本升级,对于Python2和Python3的差异做了一个调研,主要对于语法和第三方工具包支持程度进行了比较. 基本语法差异 核心类差异 Pyt ...
- python2和python3的区别(转)
基本语法差异 核心类差异 Python3对Unicode字符的原生支持 Python2中使用 ASCII 码作为默认编码方式导致string有两种类型str和unicode,Python3只支持uni ...
- python2与python3的区别齐全【整理】
本文链接:https://blog.csdn.net/pangzhaowen/article/details/80650478 展开 一.核心类差异1. Python3 对 Unicode 字符的原生 ...
- 详解:Python2中的urllib、urllib2与Python3中的urllib以及第三方模块requests
在python2中,urllib和urllib2都是接受URL请求的相关模块,但是提供了不同的功能.两个最显著的不同如下: 1.urllib2可以接受一个Request类的实例来设置URL请求的hea ...
- Python2和Python3中urllib库中urlencode的使用注意事项
前言 在Python中,我们通常使用urllib中的urlencode方法将字典编码,用于提交数据给url等操作,但是在Python2和Python3中urllib模块中所提供的urlencode的包 ...
- python3.x 和 python2.x关于 urllib的用法
在python2.x版本中可以直接使用import urllib来进行操作,但是python3.x版本中使用的是import urllib.request来进行操作,下面是简单的例子: python2 ...
- Python2 Python3 urllib方法对应
Python2 name Python3 nameurllib.urlopen() urllib.request.urlopen()urllib2.urlopen() urllib.request.u ...
- Python2中的urllib、urllib2和 Python3中的urllib、requests
目录 Python2.x中 urllib和urllib2 常用方法和类 Python3.x中 urllib requests Python2.x中 urllib和urllib2 urllib 和 ur ...
随机推荐
- SET-UID程序漏洞实验
一.实验描述 Set-UID 是Unix系统中的一个重要的安全机制.当一个Set-UID程序运行的时候,它被假设为具有拥有者的权限.例如,如果程序的拥有者是root,那么任何人运行这个程序时都会获得程 ...
- cisco vpn client 自动登陆脚本
cisco vpn client 不能保存密码,每次都要输入太麻烦了 写了个wsh,可以自动输入密码,并登陆 '需要一个好听的名字 <job id="cisco"> ' ...
- people have been arrested under other offences instead.
Homosexuality is not explicitly banned in Egypt but gay people have been arrested under other offenc ...
- MVC3之ViewData与ViewBag
首先先用代码来说话: ViewData: public ActionResult Index() { List<string> colors = new List<string> ...
- C语言程序设计第十一次作业
同学们,一晃一个学期就过去了,第一节课时,我曾做过一个调查,没有一个同学在中学阶段接触过程序设计,也就是说,那时,大家都是零基础,或许只是听说过"C语言"这个词,但其他便一无所知了 ...
- 关于selenium2(webdriver)自动化测试过程中标签页面或者窗口切换的处理解决方案
1. 通过页面或者window 的name切换: switch_to_frame(name) switch_to_window(name) 那么问题来了,出现2个或者以上窗口时候,新打开的windo ...
- MyEclipse中直接打开class文件的方法
安装步骤: 1>下载jad.exe(这是一个class文件的反编译工具,但是是命令行运行编译,使用起来不是很方便:), 将其拷贝到%JAVA_HOME%/bin目录下(其他目录也可). 2> ...
- BZOJ 3176 Sort
先一遍reverse+逆序对个数. 要开long long啊. #include<iostream> #include<cstdio> #include<cstring& ...
- php基础的一点注意事项
1.要弄懂"~"运算符的计算方法,首先必须明白二进制数在内存中的存放形式,二进制数在内存中是以补码的形式存放的 另外正数和负数的补码不一样,正数的补码,反码都是其本身,即: 正数9 ...
- C++注意事项
1.static和const不能同时修饰类的成员函数(static int getde()const;) 分析:原因在于const会在函数中添加一个隐式参数const this*,而static是没有 ...