Esempio n. 1
0
        /// <summary>
        /// 下载列表
        /// </summary>
        /// <param name="search"></param>
        public static List <DouYinModel> DownLoad(int index, string directoryPath)
        {
            List <DouYinModel> result = new List <DouYinModel>();

            try
            {
                string url = string.Format(SearchUrl, index);
                //请求搜索列表
                var list_response = HttpHelper.HttpGetRequest(url, null, null, null, keepAlive: true);
                var list_respStr  = HttpHelper.GetResponseStreamToStr(list_response);

                list_response.Close();
                result = HtmlAgilityPackHelper.GetTable(list_respStr, directoryPath);


                return(result);
            }
            catch (Exception ex)
            {
                return(result);
            }
        }