标签:code class odi port highlight log http oba www.
1.抓取网页并保存到txt中.解决控制台乱码问题
#_*_coding:utf-8_*_ import urllib2 response = urllib2.urlopen(‘http://hws.m.taobao.com/cache/wdetail/5.0/?id=540698103032‘) cont = response.read() file1 = open("./1.txt","w") file1.write(cont) file1.close() print cont.decode("utf-8").encode("gbk")
2.操作json
3.循环数组
https://www.cnblogs.com/Owen-ET/p/6932272.html
4.操作mssql
https://www.cnblogs.com/qianlifeng/archive/2012/02/06/2340367.html
https://www.cnblogs.com/lrzy/p/4346781.html
标签:code class odi port highlight log http oba www.
原文地址:http://www.cnblogs.com/xinzhyu/p/7816629.html