bug fixed

develop
old易 2024-12-11 15:44:25 +08:00
parent bb0799c9e5
commit fc488ccf1e
2 changed files with 5 additions and 5 deletions

View File

@ -79,7 +79,7 @@ namespace New_College.Tasks
var list = anghelper.HtmlCreatePageData(p.RegionCode); var list = anghelper.HtmlCreatePageData(p.RegionCode);
list.ForEach(async c => list.ForEach(async c =>
{ {
// c.title = c.title.Replace($"{p.SimpleName}", ""); c.title = c.title.Replace($"{p.SimpleName}", "");
var newsinfo = await newsInfoServices.Query(e => e.Title.Trim() == c.title); var newsinfo = await newsInfoServices.Query(e => e.Title.Trim() == c.title);
if (!newsinfo.Any() && c.pubtime.Year > DateTime.Now.Year - 1) if (!newsinfo.Any() && c.pubtime.Year > DateTime.Now.Year - 1)
{ {

View File

@ -51,8 +51,8 @@ namespace New_College.Tasks
} }
} }
var innerhtml = doc.DocumentNode.SelectSingleNode("//*[@id=\"article_dnull\"]").InnerHtml; var innerhtml = doc.DocumentNode.SelectSingleNode("//*[@id=\"article_dnull\"]").InnerHtml;
if (!HtmlHelper.ReplaceHtmlTag(innerhtml).Contains("浏览器")) //if (!HtmlHelper.ReplaceHtmlTag(innerhtml).Contains("浏览器"))
{ //{
if (innerhtml.Contains(".pdf") || innerhtml.Contains(".doc") || innerhtml.Contains(".docx") || innerhtml.Contains(".xls") || innerhtml.Contains(".xlsx")) if (innerhtml.Contains(".pdf") || innerhtml.Contains(".doc") || innerhtml.Contains(".docx") || innerhtml.Contains(".xls") || innerhtml.Contains(".xlsx"))
{ {
@ -66,7 +66,7 @@ namespace New_College.Tasks
pubtime = Convert.ToDateTime(createtime), pubtime = Convert.ToDateTime(createtime),
detail = innerhtml.Replace("src=\"", "src=\"https://gaokao.chsi.com.cn") detail = innerhtml.Replace("src=\"", "src=\"https://gaokao.chsi.com.cn")
}); });
} // }
}); });
} }
} }