Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 450

New Post: HtmlAgilityPack Unable to connect to the remote server

$
0
0
Got a problem with Html Agility Pack When I run my code it says "Unable to connect to the remote server" Does anybody know why?

Here is the code:
public void Crawler(string url, int pid)
    {

        HtmlWeb hw = new HtmlWeb();
        try
        {
            HtmlAgilityPack.HtmlDocument doc = hw.Load(url);
            HtmlNodeCollection nodes = doc.DocumentNode.SelectNodes("//a[@class='metatag-topi metatag-keywords']");
            HtmlNodeCollection nodes2 = doc.DocumentNode.SelectNodes("//div[@class='pagination']/a[@href]");
            HtmlNodeCollection phone = doc.DocumentNode.SelectNodes("//p[@class='phone fRight ml10']");

Viewing all articles
Browse latest Browse all 450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>