using System; using System.Collections.Generic; using System.Linq; using System.Text; using YTO.WeiXin.Model; using YTO.Framework.Core; using Newtonsoft.Json.Linq; using Newtonsoft.Json; namespace WeiXin.Core { public class OAuth20 { public static st
1.获取web页面 urllib2 支持任何协议的工作---不仅仅是http,还包括FTP,Gopher. import urllib2 req=urllib2.Request('http://www.baidu.com') #第一件事,建立urllib2.Request对象,注意http别掉了 fd =urllib2.urlopen(req) while 1: data =fd.read(50000) #限制读取的字符 if not len(data): break print data 2.