Skip to content

Commit

Permalink
v2.0.9.2 simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
hanel2527 committed Aug 11, 2019
1 parent 727f22e commit f839ba4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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];
Expand Down
8 changes: 5 additions & 3 deletions gallchangranking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public class GallchangrankingCrawler
bool isMinor;
public string gallId, gallName, gallUrl, version = "v2.0.8-beta";
List<UserRank> userList = new List<UserRank>();
List<UserData> gallDatas = new List<UserData>();
//List<UserData> gallDatas = new List<UserData>();

public GallchangrankingCrawler(int initPage, int endPage, string gallId, bool isMinor)
{
Expand Down Expand Up @@ -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].
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit f839ba4

Please sign in to comment.