fix: 时间字段错乱

This commit is contained in:
2024-07-08 12:38:13 +08:00
parent 2446d89b30
commit a403cba964
3 changed files with 4 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ public class InvestingTask {
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);
// Extract the date and time using regex
Pattern pattern = Pattern.compile("Updated On : <!-- --> <!-- -->(.*?)<!-- -->");
Pattern pattern = Pattern.compile("Updated On :<!-- --> <!-- -->(.*?)<!-- -->");
Matcher matcher = pattern.matcher(n);
String time = "";
if (matcher.find()) {