• R/O
  • SSH
  • HTTPS

openpishcrawler: Commit


Commit MetaInfo

Revision7 (tree)
Time2019-11-14 06:25:56
Authorsebastiandotnet

Log Message

- fix suspended list
- fix sleeping check(not done)

Change Summary

Incremental Difference

--- OpenPishCrawler/Service/OpenPishSleep.cs (revision 6)
+++ OpenPishCrawler/Service/OpenPishSleep.cs (revision 7)
@@ -23,11 +23,11 @@
2323 if (null == page)
2424 throw new ArgumentNullException(nameof(page));
2525
26- var document = ReadPageDocument(page.Url);
27- var sleepy = document.DocumentNode.FirstChild.ChildNodes.FirstOrDefault(e => e.Name == "body")?
28- .ChildNodes.FirstOrDefault(e => e.Name == "div")?
29- .ChildNodes.FirstOrDefault(e => e.Name == "div");
30- result = sleepy?.InnerText == "Website is sleeping.";
26+ ReadPageDocument(page.Url);
27+ //var sleepy = document.DocumentNode.FirstChild.ChildNodes.FirstOrDefault(e => e.Name == "body")?
28+ // .ChildNodes.FirstOrDefault(e => e.Name == "div")?
29+ // .ChildNodes.FirstOrDefault(e => e.Name == "div");
30+ //result = sleepy?.InnerText == "Website is sleeping.";
3131 }
3232 catch (WebException exception)
3333 {
--- OpenPishCrawler/Service/OpenPishSuspended.cs (revision 6)
+++ OpenPishCrawler/Service/OpenPishSuspended.cs (revision 7)
@@ -77,7 +77,7 @@
7777 Clear();
7878 if (File.Exists(filePath))
7979 {
80- var rootNode = XElement.Load(filePath).FirstNode as XElement;
80+ var rootNode = XElement.Load(filePath);
8181 var items = rootNode.Elements("Suspended").Select(e => new Suspended(e.Value));
8282 foreach (var item in items)
8383 Items.Add(item);
--- OpenPishCrawler/MainForm.cs (revision 6)
+++ OpenPishCrawler/MainForm.cs (revision 7)
@@ -9,7 +9,7 @@
99 public MainForm()
1010 {
1111 InitializeComponent();
12- Text = String.Format("{0}", typeof(MainForm).Assembly.GetName().Name, Program.IsAdministrator ? "(Administrator)" : String.Empty);
12+ Text = String.Format("{0}{1}", typeof(MainForm).Assembly.GetName().Name, Program.IsAdministrator ? "(Administrator)" : String.Empty);
1313 CreateHandle();
1414 Bind();
1515 }
Show on old repository browser