新闻时间处理

This commit is contained in:
gs
2024-06-20 16:54:56 +08:00
parent 33a68eb7e8
commit f50b6b5519

View File

@@ -177,7 +177,7 @@ public class StockApiController {
String contentUrl = n.substring(1, n.indexOf("class=\"img-smllnews\"") - 2);
String id = contentUrl.substring(contentUrl.lastIndexOf("-") + 1, contentUrl.lastIndexOf("_"));
String imgUrl = n.substring(n.indexOf("img loading=\"lazy\" src=") + 24, n.indexOf("?"));
String time = n.substring(n.indexOf("Last Updated") + 23, n.indexOf("IST") - 9);
String time = n.substring(n.indexOf("<span>Updated On : <!-- --> <!-- -->") + 36, n.indexOf("IST") - 9);
SiteNews siteNews = new SiteNews();
siteNews.setAddTime(new Date());