http
lxlzhn
热爱技术,热爱互联网!
展开
-
python——http请求
python发送HTTP请求,很简洁: 1. get import urllib url="http://www.zhangyue.com" sock= urllib.urlopen(url) html = sock.read() sock.close() 2. post(和get的区别在于是否传参数) import urllib url = "http://原创 2013-05-13 20:29:29 · 3100 阅读 · 0 评论 -
python——解析Http编码
python总是那么简洁,解析Http编码: import HTMLParser h = HTMLParser.HTMLParser() s = h.unescape("无") print s原创 2013-05-13 20:33:11 · 1972 阅读 · 0 评论