抓取【你懂的】应用的数据

  /// <summary>
        /// 你懂的
        /// </summary>
        /// <returns></returns>
        public ActionResult CollectYoudongde()
        {
            string requestUrl = "http://103.28.46.112/amuse/ContentList?index=1&type=1";
            HttpWebRequest request = HttpWebRequest.Create(requestUrl) as HttpWebRequest;
            HttpWebResponse response = request.GetResponse() as HttpWebResponse;
            Stream sr = response.GetResponseStream();
            Youknow entity = JsonConvert.DeserializeObject<Youknow>(new StreamReader(sr).ReadToEnd());
            return View();
        }

//用到的实体

  #region 【(你懂的)数据实体】
    public class Youknow
    {
        public bool rs { get; set; }
        public int PicCount { get; set; }
        public int contCount { get; set; }
        public List<info> info { get; set; }
    }
    public class info
    {
        public int Id { get; set; }
        public DateTime datetime { get; set; }
        public string share { get; set; }
        public string support { get; set; }
        public string dissupport { get; set; }
        public string content { get; set; }
        public string source { get; set; }
        public string biglink { get; set; }
        public string link { get; set; }

    }
    #endregion
原文地址:https://www.cnblogs.com/sumg/p/3940267.html