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);
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);
if (!newsinfo.Any() && c.pubtime.Year > DateTime.Now.Year - 1)
{

View File

@ -35,7 +35,7 @@ namespace New_College.Tasks
{
resultlist.msg.ForEach(o =>
{
Thread.Sleep(100);
Thread.Sleep(100);
string newsUrl = $"{itemUrl}{o.uri}";
HtmlDocument doc = webClient.Load(newsUrl);
var inntertitle = doc.DocumentNode.SelectSingleNode("//*[@id=\"app\"]/div[2]/h2").InnerText;
@ -51,8 +51,8 @@ namespace New_College.Tasks
}
}
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"))
{
@ -66,7 +66,7 @@ namespace New_College.Tasks
pubtime = Convert.ToDateTime(createtime),
detail = innerhtml.Replace("src=\"", "src=\"https://gaokao.chsi.com.cn")
});
}
// }
});
}
}