Exemplo n.º 1
0
            private void scrapeSource(String pageSource)
            {
                HtmlDOM dom = new HtmlDOM(pageSource);

                foreach (HtmlNode node in dom.getNodes("//p[@class=\"row\"]/span[@class=\"pl\"]/a[@href]"))
                {
                    //if (!this._searching) { break; };
                    String href = dom.getAttribute(node, "href", String.Empty);
                    this._scraper.getSource(formatUri(_url,href), scrapeData);
                }
            }
Exemplo n.º 2
0
            private void scrapeData(String pageSource)
            {
                _search.dgResults.Dispatcher.Invoke((Action)(() =>
                {
                    HtmlDOM dom = new HtmlDOM(pageSource);

                    try
                    {
                        String title = dom.getNode("//html/head/title").InnerHtml;
                        _search.dgResults.Items.Add(new DG.Items() { title = title, counter = _search.dgResults.Items.Count + 1});
                    }
                    catch { }
                }));
            }