2013年5月9日

中文图解python脚本

摘要: 中文图解python脚本 阅读全文

posted @ 2013-05-09 21:44 hellopython 阅读(332) 评论(1) 推荐(0)

urllib2 的使用细节

摘要: 1 Proxy 的设置2 Timeout 设置3 在 HTTP Request 中加入特定的 Header4 Redirect5 Cookie6 使用 HTTP 的 PUT 和 DELETE 方法7 得到 HTTP 的返回码8 Debug Log1 Proxy 的设置urllib2 默认会使用环境变量 http_proxy 来设置 HTTP Proxy。如果想在程序中明确控制 Proxy,而不受环境变量的影响,可以使用下面的方式import urllib2enable_proxy = Trueproxy_handler = urllib2.ProxyHandler({"http&qu 阅读全文

posted @ 2013-05-09 21:42 hellopython 阅读(178) 评论(0) 推荐(0)

导航