예제 #1
0
        private void GetQuote()
        {
            this.DataPoints.Add(new DataPoint(
                                    name: "COMPANY",
                                    value: this.Document.GetNodeBySelector("//h1").GetText()
                                    ));

            IHtmlNode quoteHeader = this.Document.GetNodesByAttribute("div", "id", "quote-market-notice").First();

            IHtmlNode[] items = quoteHeader.GetAncestor().GetNodesBySelector("span").ToArray();

            this.DataPoints.Add(new DataPoint(
                                    name: "PRICE",
                                    value: items[0].GetText()
                                    ));

            this.DataPoints.Add(new DataPoint(
                                    name: "VARIATION",
                                    value: items[1].GetText()
                                    ));
        }