Esempio n. 1
0
        private double GetArea(ISpider spider, string link)
        {
            var estateDetail = spider.Grab(link);
//            <dd class="titlew">占地面积</dd>
//            <dd class="tidfes">490000平米&nbsp;</dd>
            var regex = new Regex("(?<=<dd\\s*class=\"titlew\">占地面积</dd>(.|\n)*?<dd\\s*class=\"tidfes\">)\\d+(?=平米)", RegexOptions.Compiled);
            var match = regex.Match(estateDetail);

            return(TryParseDouble(match.Value));
        }