新闻时间处理
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user