文章目录

Pycurl包是一个libcurl的Python接口,由C语言编写的,功能强大,速度快。由于pycurl的属性和方法太多了,写这篇博文记录一下pycurl的属性和方法。

正常安装

pip install pycurl
如果出现问题,可以按照系统版本搜索安装方法,比如centos7.1 安装pycurl

通用请求方法

GET请求方法

POST请求方法

windows访问https

windows 访问https的方法,需要证书

获取网页多重跳转之后的地址

记录Cookie

其他属性

参考文档
http://pycurl.io/docs/latest/quickstart.html
https://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance

First and foremost, requests is built on top of the urllib3 library, the stdlib urllib or urllib2 libraries are not used at all.

There is little point in comparing requests with pycurl on performance. pycurl may use C code for its work but like all network programming, your execution speed depends largely on the network that separates your machine from the target server. Moreover, the target server could be slow to respond.

In the end, requests has a far more friendly API to work with, and you'll find that you'll be more productive using that friendlier API.

Pycurl 使用,Request与Pycurl  性能比较-Python 技术分享 Java技术分享 Python 爬虫技术_微信公众号:zeropython—昊天博客
Pycurl 使用,Request与Pycurl  性能比较-Python 技术分享 Java技术分享 Python 爬虫技术_微信公众号:zeropython—昊天博客
HTTPX 基础教程-新乡seo|网站优化,网站建设_微信公众号:zeropython—昊天博客