diff --git a/Newsbot.Collector.Services/HtmlParser/HtmlPageReader.cs b/Newsbot.Collector.Services/HtmlParser/HtmlPageReader.cs
index 7b36f3d..051b98b 100644
--- a/Newsbot.Collector.Services/HtmlParser/HtmlPageReader.cs
+++ b/Newsbot.Collector.Services/HtmlParser/HtmlPageReader.cs
@@ -36,11 +36,19 @@ public class HtmlPageReader
private string ReadSiteContent(string url)
{
using var client = new HttpClient();
- var html = client.GetStringAsync(url);
- html.Wait();
+ try
+ {
+ var html = client.GetStringAsync(url);
+ html.Wait();
- var content = html.Result;
- return content;
+ var content = html.Result;
+ return content;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Failed to connect to '{url}'. {ex.Message}");
+ return "";
+ }
}
public string GetSiteContent()