对于刚刚接触python爬虫的人,常常会碰到一个比较烦的问题,

如果网页是GB2312编码格式,我们直接decode(’GB2312‘)一般python都会报错:

GB2312不能编码该页面。

这就比较奇怪了

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

网页的charset明明是GB2312,却出错了。

事实上微软将 gb2312 和 gbk 统一映射为 gb18030,这个问题也比较无语大家可以参考:

http://powerelite.blog.163.com/blog/static/429658912014394820777/

最新文章

  1. attr和prop
  2. IOS第四天(3:数组的排序和乱序)
  3. windows 下 文件属性及目录列表操作
  4. Python 时间函数
  5. 括号匹配算法 C语言实现
  6. hdu 5057 Argestes and Sequence
  7. VxWorks6.6 pcPentium BSP 使用说明(二):创建启动盘
  8. select value from v$diag_info where name=&#39;Default Trace File&#39;;
  9. gem devise配置
  10. diskpart 的简单使用
  11. linux centos 安装Jenkins(非docker方式)
  12. java.io.IOException: There appears to be a gap in the edit log. We expected txid ***, but got txid
  13. AD、PADS、Cadence对比
  14. eureka服务注册发现流程和核心参数
  15. 【Linux】Centos下安装ffmpeg
  16. KSQL和Flink SQL的比较
  17. Eloquent JavaScript #07# Project: A Robot
  18. P4071 [SDOI2016]排列计数
  19. HDU 1535 SPFA 前向星存图优化
  20. IllegalStateException: Unable to find a @SpringBootConfiguration

热门文章

  1. Mysql On Mac OS: Remove &amp; Install
  2. AD添加LOGO的方法
  3. cadence allegro 布线时添加过孔
  4. 【CF809D】Hitchhiking in the Baltic States Splay
  5. angular开发控制器之间的通信
  6. 自定义tarBar
  7. UPUPW本地环境配置thinkphp5的问题
  8. 洛谷P2569 股票交易【dp】【单调队列】
  9. NBUTOJ 1643 - 阶乘除法 - [数学题]
  10. Borg Maze---poj3026最小生成树+bfs