Compare commits
1 Commits
cb4d22014c
...
0158b3092a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0158b3092a |
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user