이전 날짜 처리 추가
This commit is contained in:
1
Form1.Designer.cs
generated
1
Form1.Designer.cs
generated
@@ -59,6 +59,7 @@
|
||||
this.lvList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lvList.FullRowSelect = true;
|
||||
this.lvList.GridLines = true;
|
||||
this.lvList.HideSelection = false;
|
||||
this.lvList.Location = new System.Drawing.Point(0, 0);
|
||||
this.lvList.MultiSelect = false;
|
||||
this.lvList.Name = "lvList";
|
||||
|
||||
18
Form1.cs
18
Form1.cs
@@ -72,7 +72,15 @@ namespace NewsCrawler
|
||||
string strTime = item.SelectSingleNode(".//span").InnerText;
|
||||
string strURL = strServerURL+item.SelectSingleNode(".//a").GetAttributeValue("href", "");
|
||||
|
||||
if(m_ItemList.Any(c => c.m_strURL==strURL)==false)
|
||||
|
||||
if (Regex.IsMatch(strTime, @"\d+/\d+") == true)
|
||||
{
|
||||
//Console.WriteLine("어제 기사 : " + item.InnerHtml);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (m_ItemList.Any(c => c.m_strURL==strURL)==false)
|
||||
{
|
||||
NEWS_ITEM news = new NEWS_ITEM();
|
||||
news.m_strTitle=strTitle;
|
||||
@@ -119,7 +127,13 @@ namespace NewsCrawler
|
||||
string strURL = item.SelectSingleNode(".//a").GetAttributeValue("href", "");
|
||||
strURL = "http://www.etoday.co.kr/news/section/newsview.php?idxno="+Regex.Replace(strURL, @"\D", "");
|
||||
|
||||
if(m_ItemList.Any(c => c.m_strURL==strURL)==false)
|
||||
if (Regex.IsMatch(strTime, @"\d+/\d+") == true)
|
||||
{
|
||||
//Console.WriteLine("어제 기사 : " + item.InnerHtml);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m_ItemList.Any(c => c.m_strURL==strURL)==false)
|
||||
{
|
||||
NEWS_ITEM news = new NEWS_ITEM();
|
||||
news.m_strTitle=strTitle;
|
||||
|
||||
Reference in New Issue
Block a user