Revision | 9 (tree) |
---|---|
Zeit | 2019-11-14 07:47:29 |
Autor | sebastiandotnet |
- remove HtmlAgilityPack from sleeping check
@@ -1,11 +1,6 @@ | ||
1 | 1 | using System; |
2 | -using System.Collections.Generic; | |
3 | -using System.Linq; | |
4 | -using System.Text; | |
5 | -using System.Threading.Tasks; | |
6 | 2 | using System.IO; |
7 | 3 | using System.Net; |
8 | -using HtmlAgilityPack; | |
9 | 4 | using OpenPishCrawler.Data; |
10 | 5 | |
11 | 6 | namespace OpenPishCrawler.Service |
@@ -23,7 +18,7 @@ | ||
23 | 18 | if (null == page) |
24 | 19 | throw new ArgumentNullException(nameof(page)); |
25 | 20 | |
26 | - ReadPageDocument(page.Url); | |
21 | + ReadPage(page.Url); | |
27 | 22 | } |
28 | 23 | catch (WebException exception) |
29 | 24 | { |
@@ -38,14 +33,6 @@ | ||
38 | 33 | return result; |
39 | 34 | } |
40 | 35 | |
41 | - private HtmlDocument ReadPageDocument(string url) | |
42 | - { | |
43 | - var result = new HtmlDocument(); | |
44 | - var page = ReadPage(url); | |
45 | - result.LoadHtml(page); | |
46 | - return result; | |
47 | - } | |
48 | - | |
49 | 36 | private string ReadPage(string url) |
50 | 37 | { |
51 | 38 | if (!(url.StartsWith("http://") || url.StartsWith("https://"))) |