Compare commits

...

1 Commits

Author SHA1 Message Date
Myeongjin Jo
cb4d22014c etoday title trim 2019-08-07 02:11:49 +09:00
2 changed files with 4 additions and 4 deletions

View File

@@ -658,7 +658,7 @@
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(132, 12); this.label9.Size = new System.Drawing.Size(132, 12);
this.label9.TabIndex = 20; this.label9.TabIndex = 20;
this.label9.Text = "Version : 2018.12.04.13"; this.label9.Text = "Version : 2019.08.07.00";
// //
// cbMockTrading // cbMockTrading
// //

View File

@@ -161,8 +161,8 @@ namespace NewsCrawler
foreach (var item in lists) foreach (var item in lists)
{ {
string strTitle = item.SelectSingleNode(".//a").InnerText; string strTitle = item.SelectSingleNode(".//a").InnerText.Trim();
string strTime = item.SelectSingleNode(".//span[contains(@class, 'flash_press')]").InnerText; string strTime = item.SelectSingleNode(".//span[contains(@class, 'flash_press')]").InnerText.Trim();
string strURL = item.SelectSingleNode(".//a").GetAttributeValue("href", ""); string strURL = item.SelectSingleNode(".//a").GetAttributeValue("href", "");
strURL="http://www.etoday.co.kr/news/section/newsview.php?idxno="+Regex.Replace(strURL, @"\D", ""); strURL="http://www.etoday.co.kr/news/section/newsview.php?idxno="+Regex.Replace(strURL, @"\D", "");
@@ -243,7 +243,7 @@ namespace NewsCrawler
foreach(var item in lists) foreach(var item in lists)
{ {
string strTitle = item.SelectSingleNode(".//title").InnerText; string strTitle = item.SelectSingleNode(".//title").InnerText.Trim();
strTitle = strTitle.Substring(iCDATALen, strTitle.Length-iCDATALen-3); strTitle = strTitle.Substring(iCDATALen, strTitle.Length-iCDATALen-3);
string strTime = item.ChildNodes["pubDate"].InnerText; string strTime = item.ChildNodes["pubDate"].InnerText;
DateTime time = Convert.ToDateTime(strTime); DateTime time = Convert.ToDateTime(strTime);