From f839ba4966f0b8c1d2a03a8c0bf46d43ceecd0bf Mon Sep 17 00:00:00 2001 From: hanel2527 Date: Mon, 12 Aug 2019 00:30:23 +0900 Subject: [PATCH] v2.0.9.2 simplified --- Form1.Designer.cs | 2 +- Form1.cs | 7 ++++++- gallchangranking.cs | 8 +++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Form1.Designer.cs b/Form1.Designer.cs index d2769b6..f7d90e9 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -452,7 +452,7 @@ private void InitializeComponent() this.ClientSize = new System.Drawing.Size(800, 501); this.Controls.Add(this.tabPages); this.Name = "Form1"; - this.Text = "갤창랭킹.v2.0.10"; + this.Text = "갤창랭킹.v2.0.9.2"; this.Load += new System.EventHandler(this.Form1_Load); this.dataToText.ResumeLayout(false); this.dataToText.PerformLayout(); diff --git a/Form1.cs b/Form1.cs index ed14489..1bf9489 100644 --- a/Form1.cs +++ b/Form1.cs @@ -15,7 +15,7 @@ namespace DcCrawler.WF { public partial class Form1 : Form { - public string version = "v2.0.10"; + public string version = "v2.0.9.2"; public Form1() { InitializeComponent(); @@ -52,7 +52,12 @@ private void gallCheckBtn_Click(object sender, EventArgs e) private void NewPageUpdate(object sender, EventArgs e) { System.Collections.ArrayList arr = (System.Collections.ArrayList)sender; + if((int)arr[2] % 1000 == 0) + { + textConsole.Clear(); + } textConsole.AppendText((string)arr[0] + "\r\n"); + if (isRangeDate.Checked) { TimeSpan timeSpan = endDate.Value - (DateTime)arr[1]; diff --git a/gallchangranking.cs b/gallchangranking.cs index 6078772..a6ee32d 100644 --- a/gallchangranking.cs +++ b/gallchangranking.cs @@ -288,7 +288,7 @@ public class GallchangrankingCrawler bool isMinor; public string gallId, gallName, gallUrl, version = "v2.0.8-beta"; List userList = new List(); - List gallDatas = new List(); + //List gallDatas = new List(); public GallchangrankingCrawler(int initPage, int endPage, string gallId, bool isMinor) { @@ -457,7 +457,7 @@ public void Crawler() } UserData tempUserData = new UserData(tempUserInfo); tempUserData.DataInput(gallNum, replyNum, gallCount, gallRecommend, gallDate, subject); - gallDatas.Add(tempUserData); + //gallDatas.Add(tempUserData); } previousPageGallNum = GetOnlyInt(nicks[nicks.Count - 1].SelectSingleNode("./td[@class='gall_num']").InnerText); DateTime currentDate = DateTime.ParseExact(nicks[nicks.Count - 1]. @@ -501,15 +501,17 @@ orderby userRank.count descending public void SaveResult(string filename) { string outputUserList = njson.JsonConvert.SerializeObject(userList, njson.Formatting.Indented); - string outputUserDatas = njson.JsonConvert.SerializeObject(gallDatas, njson.Formatting.Indented); + //string outputUserDatas = njson.JsonConvert.SerializeObject(gallDatas, njson.Formatting.Indented); using (var ofile = new StreamWriter(filename + ".json")) { ofile.WriteLine(outputUserList); } + /* using (var ofile = new StreamWriter(filename + ".gall-data.json")) { ofile.WriteLine(outputUserDatas); } + */ Console.WriteLine(filename); Console.ReadLine(); }