etoday title trim

This commit is contained in:
Myeongjin Jo
2019-08-07 00:24:11 +09:00
parent 9864e46d5f
commit cb4d22014c
2 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -161,8 +161,8 @@ namespace NewsCrawler
foreach (var item in lists)
{
string strTitle = item.SelectSingleNode(".//a").InnerText;
string strTime = item.SelectSingleNode(".//span[contains(@class, 'flash_press')]").InnerText;
string strTitle = item.SelectSingleNode(".//a").InnerText.Trim();
string strTime = item.SelectSingleNode(".//span[contains(@class, 'flash_press')]").InnerText.Trim();
string strURL = item.SelectSingleNode(".//a").GetAttributeValue("href", "");
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)
{
string strTitle = item.SelectSingleNode(".//title").InnerText;
string strTitle = item.SelectSingleNode(".//title").InnerText.Trim();
strTitle = strTitle.Substring(iCDATALen, strTitle.Length-iCDATALen-3);
string strTime = item.ChildNodes["pubDate"].InnerText;
DateTime time = Convert.ToDateTime(strTime);