HtmlAgilityPACK showing Error “ The given path's format is not supported” when loading html page from web server

前端 未结 1 1321
萌比男神i
萌比男神i 2021-01-12 18:01

I am using my local Apache Server and its address is 127.0.0.1 . and i trying to load html page from this server to C# programme using HTML Agility PACk but its showing

相关标签:
1条回答
  • 2021-01-12 18:43

    doc.Load takes a path to a local file on disk.

    You should use the HtmlWeb class:

    HtmlDocument docHtml = new HtmlWeb().Load(url);
    
    0 讨论(0)
提交回复
热议问题