이 웹 사이트 를 긁어 모으고 있지만 그것을 할 수 없습니다.
메시지와 함께 예외가 발생하여 Error downloading Html
가 발생했습니다.
C # 코드
async public static Task<HtmlDocument> GetDocument()
{
HtmlDocument doc = null;
string url = "https://www.finedininglovers.com/recipes/appetizer/vegan-dishes-white-asparagus/";
try
{
HtmlWeb web = new HtmlWeb();
doc = await web.LoadFromWebAsync(url);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine(ex.StackTrace);
}
return doc;
}
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7
은 UserAgent로 작동하지만 여전히 작동하지 않습니다.