Ejemplo n.º 1
0
        /// <summary>
        /// Finds price value
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        private static string FindPrice(HtmlNode node, Regex curRegex, ParseDomainParams pdp)
        {
            var v = curRegex.Match(node.InnerText).Value;

            if (v != "")
            {
                var s = pdp.PriceRegex.Match(v).Value;
                s = Currencies.CutPrice(s, pdp.DecimalSeparator);
                if (pdp.DecimalSeparator != "")
                {
                    s = s.Replace(pdp.DecimalSeparator, Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator);
                }
                return(s);
            }

            return("");
        }