![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
AlanBlog
我只是将自己在学习中学到的知识发布到这里,也欢迎大家和我一起讨论:欢迎大家访问我的个人网站:http://www.yykjc.cn 方便大家一起讨论
展开
-
【Python】Ubuntu部署python3.7的开发和运行环境
https://www.cnblogs.com/beer/p/5557497.html转载 2019-01-23 17:30:39 · 261 阅读 · 0 评论 -
【Python】Ubuntu部署python3.7的开发和运行环境
一、下载 下载指定平台下的python3.7.1的环境wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz 二、解压命令:tar -xvzf Python-3.7.1.tgz三、安装进入解压过后的目录进行配置./configure --with-ssl --prefix...原创 2019-01-23 17:46:02 · 536 阅读 · 0 评论 -
【Python】请求网页数据(urlopen)
提要:1.urlopen(URL) 可以返回URL对应网页的数据贴图:代码:#encoding: utf-8from urllib import requestres = request.urlopen("http://47.94.171.17:8080")print(res.read())返回结果:G:\PythonProject\Demo1...原创 2019-04-10 15:52:55 · 1548 阅读 · 0 评论 -
【Python】获取网络上的文件(urlretrieve)
图片:代码:#encoding: utf-8from urllib import requestrequest.urlretrieve("https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_86d58ae1.png","baidu.jpg")结果:...原创 2019-04-10 15:59:18 · 1154 阅读 · 0 评论 -
【Python】URL编码(urlencode)和URL解码(parse_qs)
提要:编码用urlencode()函数 解码用 (parse_qs)图片:代码:#encoding: utf-8from urllib import requestfrom urllib import parsekeyword = {"wd":"庄宿正"}encode = parse.urlencode(keyword)print(encode)print(...原创 2019-04-10 16:15:55 · 4565 阅读 · 0 评论 -
【Python】使用代理服务器访问网站
代理原理:在请求目的网站之前,先请求代理服务器,然后让代理服务器去请求目的网站,代理服务器拿到目前的网站数据后,再转发给我们代码:from urllib import request,parseurl = "http://httpbin.org/ip"handler = request.ProxyHandler({"HTTP":"223.241.78.43:8010"});op...原创 2019-04-10 18:20:37 · 11280 阅读 · 2 评论