zoukankan      html  css  js  c++  java
  • 抓取【你懂的】应用的数据

      /// <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
  • 相关阅读:
    http服务读取配置文件,交叉编译
    etcd增删改查
    初始
    20141017--类型String类
    20141017--异常语句try-catch
    20141017--循环语句whlie,do
    20141017--循环语句for 穷举
    20141016--for 菱形
    20141016--for 兔子
    20141015--for语句1
  • 原文地址:https://www.cnblogs.com/sumg/p/3940267.html
Copyright © 2011-2022 走看看