python网络
2024-08-27 12:20:11
try:
import urllib.request as urllib2
except ImportError:
import urllib2 response = urllib2.urlopen("http://www.baidu.com")
print(response.getcode())
response = urllib2.urlopen('http://www.cnblogs.com/txw1958/archive/2012/03/12/2392067.html')
html = response.read()
print(html.decode('utf-8')) //16进制转utf-8
最新文章
- [转]程序员趣味读物:谈谈Unicode编码
- GNS3 IOU 配置
- 利用 druid 解析器解析SQL
- Linux 下源码包安装MariaDB
- java开发微信公众平台备忘
- jquery动态样式操作
- gcc 安装
- mysql sql limit where having order
- tomcat https jks 沃通免费证书安装 解决方案
- Unity带有网络功能——创建服务,并连接到一个特定的服务
- Zabbix实战-简易教程--技巧(本地化)
- AFNetworking 源码解读
- Linux实战
- YUM仓库安装LAMP与LNMP
- Spring杂记BeanFactory之getBean方法
- Codeforces Round #361 (Div. 2) E. Mike and Geometry Problem 离散化 排列组合
- Jquery 监听浏览器前进后退
- selenium自动化之显式等待和EC(expected_conditions)模块
- Git学习手记
- html:<;link>; 标签中的 media 属性
热门文章
- HH的项链题解(离线思想+链表+树状数组)
- k8s的secret基本概念及案例
- 小技巧之padding-bottom实现等比例图片缩放
- 使用natapp本地映射外网服务
- String使用方法详解
- Diycode开源项目 LoginActivity分析
- day19 Dgango进阶 路由系统及 ORM 详解
- How to check if Visual Studio 2005 SP1 is installed
- 介绍 Active Directory 域服务 (AD DS) 虚拟化
- Careercup - Microsoft面试题 - 5672369481842688