# -*- coding: utf-8 -*-
import chardet
import urllib #可根据需要,选择不同的数据
TestData = urllib.urlopen('http://www.baidu.com/').read()
try:
print chardet.detect(TestData)
except Exception,e:
print(e)

运行的时候可能会出错,试着重新打开pycharm

最新文章

  1. css 温故而知新 定位(position)与权限(z-index)
  2. Java Web Cookie
  3. liunx几台机器直接用ssh链接
  4. JavaScript高级程序设计11.pdf
  5. BZOJ 1610: [Usaco2008 Feb]Line连线游戏
  6. 用Bottle开发web程序(二)
  7. 利用GeneratedKeyHolder获得新增数据主键值
  8. github使用及代码同步
  9. Python descriptor
  10. JAVA 语法2
  11. sourceTree回退撤销commit
  12. 安装VisualSVN Server 报"Service 'VisualSVN Server' failed to start. Please check VisualSVN Server log in Event Viewer for more details"错误.原因是启动"VisualSVN Server"失败
  13. 非对称加密与GPG/PGP
  14. Hbase远程连接:Can't get the locations
  15. MAC LINUX 安装PYQT(事例)
  16. 4.keras实现-->生成式深度学习之用GAN生成图像
  17. 微信公众号支付JSAPI,提示:2支付缺少参数:appId
  18. 微信小程序 --- action-sheet底部弹框
  19. 寻找最大的K个数(上)
  20. 【Oracle 12c】CUUG OCP认证071考试原题解析(35)

热门文章

  1. MySQL 7种 JOIN连表方法
  2. Centos 7 SSh--端口号的更改
  3. UVa 10047 自行车 状态记录广搜
  4. Caffe学习使用__运行caffe自带的两个简单例子
  5. Python中的十大图像处理工具
  6. for循环与内置方法详解
  7. 【洛谷P4393】Sequence
  8. python之路day14--嵌套函数、匿名函数、高阶函数。函数的递归
  9. uwsgi 的启动、停止、重启
  10. NodeJs 提供了 exports 和 require 两个对象