新闻测试
This commit is contained in:
@@ -174,7 +174,7 @@ public class StockApiController {
|
||||
String news = stockService.getNews();
|
||||
List<String> newsList = Arrays.asList(news.split("<a href="));
|
||||
newsList = newsList.subList(1, newsList.size());
|
||||
return ServerResponse.createBySuccess(newsList);
|
||||
return ServerResponse.createBySuccess(stockService.getNewsInfo("https://www.business-standard.com/markets/news/bajaj-auto-s-m-cap-surpasses-rs-2-trillion-mark-on-rs-4-000-crore-buyback-124010900178_1.html"));
|
||||
/*newsList.forEach( n -> {
|
||||
String contentUrl = n.substring(1, n.indexOf("class=\"img-smllnews\"") - 2);
|
||||
String id = contentUrl.substring(contentUrl.lastIndexOf("-") + 1, contentUrl.lastIndexOf("_"));
|
||||
|
||||
Reference in New Issue
Block a user