html = requests.get(YieldCurveUrl, headers=headers)
html=html.content.decode('UTF-8')
# print(html)
soup = BeautifulSoup(html, 'lxml')

之前是这样的

html = requests.get(YieldCurveUrl, headers=headers)
soup = BeautifulSoup(html.text, 'lxml')

出现乱码,一般是两种原因,charset使用了geb2312的编码方式,而非utf-8

这里用的是utf-8,所以问题出在使用了gzip的压缩方式

最新文章

  1. slave IO流程之二:注册slave请求和dump请求
  2. Hive 实战(1)--hive数据导入/导出基础
  3. 使用Gradle运行集成测试
  4. NGUI 基础知识
  5. Ubuntu 12.04 DNS服务器的配置方法
  6. Struts2(二)---将页面表单中的数据提交给Action
  7. eclipse启动无响应,停留在Loading workbench状态
  8. Spring-MongoDB简单操作
  9. display:inline-block的空白bug问题
  10. HDOJ 3547 DIY Cube 解题报告
  11. Mac OS X Yosemite 10.10 配置 Apache+PHP 教程注意事项
  12. HashMap与HashTable联系与区别
  13. WIN7下制作的ubunbu U盘安装无法使用
  14. WPF Canvas小例子
  15. 关于js对象值的传递
  16. ICC_lab总结——ICC_lab6:版图完成
  17. CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
  18. 解决:mysql is blocked because of many connection errors;
  19. 优化表单数据的JS校验
  20. [BZOJ2654] tree (kruskal & 二分答案)

热门文章

  1. Context - React跨组件访问数据的利器
  2. python开发项目:学生选课系统
  3. Warning: The following processes: -cmd.exe -java.exe are locking the following directory:
  4. hdu 4079简单贪心
  5. hdu 1163
  6. BA-siemens-apogee-ppcl
  7. CF870A Search for Pretty Integers
  8. rails的数据库查询方法
  9. leetCode(32):Power of Two
  10. caffe—ssd安装教程