C#如何抓取网页某个时间断之后的数据

            string regex = "<td class=\"art_tit\"><a href=\"(?<text>[^\"]*).*title=\"(?<title>[^\"]*\")";
            MatchCollection mces = RegexUtil.GetGroupByRegex(html, regex);
            if (mces == null || mces.Count <= 0) return;


            //抓取网页的所有数据
            DateTime startDate = new DateTime(2018, 4, 3);
            foreach (Match m in mces)
            {
                DateTime date = TypeConvertUtil.StringToDateTime(m.Groups["date"].Value.Trim());
                if (date <= startDate) continue;


                SeekerResult result = new SeekerResult();
                result.OrgCode = OrgCode;
                result.Title = m.Groups["title"].Value.Trim();

猜你喜欢

转载自blog.csdn.net/cxlhuihui/article/details/80742283
今日推荐