修改时间2
This commit is contained in:
@@ -14,8 +14,8 @@ public class BocaiApplication {
|
||||
public static void main(String[] args) {
|
||||
ApplicationContext context = SpringApplication.run(BocaiApplication.class, args);
|
||||
|
||||
BetSchedule betSchedule = context.getBean(BetSchedule.class);
|
||||
betSchedule.placeBet();
|
||||
/*BetSchedule betSchedule = context.getBean(BetSchedule.class);
|
||||
betSchedule.placeBet();*/
|
||||
|
||||
// // 依次执行三个任务
|
||||
//
|
||||
|
||||
@@ -28,7 +28,7 @@ public class CrawlerSchedule {
|
||||
// 每7秒执行一次爬取开奖结果
|
||||
//@Scheduled(cron = "*/9 * * * * ?")
|
||||
//每天07:06:00开始,每隔5分钟执行一次,
|
||||
@Scheduled(cron = "6/5 7 * * * ?")
|
||||
// @Scheduled(cron = "6/5 7 * * * ?")
|
||||
public void executeLotteryDraw() {
|
||||
System.out.println("开始爬取开奖结果...");
|
||||
int retryCount = 0;
|
||||
@@ -113,9 +113,9 @@ public class CrawlerSchedule {
|
||||
|
||||
|
||||
// 每7秒执行一次爬取今日已经结算
|
||||
//@Scheduled(cron = "*/7 * * * * ?")
|
||||
@Scheduled(cron = "*/7 * * * * ?")
|
||||
//每天07:06:00开始,每隔5分钟执行一次,
|
||||
@Scheduled(cron = "6/5 7 * * * ?")
|
||||
//@Scheduled(cron = "6/5 7 * * * ?")
|
||||
public void executeSettlement() {
|
||||
System.out.println("开始爬取今日已经结算...");
|
||||
int retryCount = 0;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ExBetScriptSchedule {
|
||||
}
|
||||
|
||||
// 每分钟执行一次
|
||||
@Scheduled(cron = "0 * * * * ?")
|
||||
//@Scheduled(cron = "0 * * * * ?")
|
||||
public void executePythonScript() {
|
||||
System.out.println("开始执行Python脚本...");
|
||||
|
||||
|
||||
@@ -81,6 +81,11 @@ public class CompletedTodayCrawler implements PageProcessor {
|
||||
lastParseSuccess = true; // 标记失败
|
||||
return;
|
||||
}
|
||||
if (content.contains("可赢金额")) {
|
||||
System.out.println("未结明细不用爬");
|
||||
lastParseSuccess = false; // 标记失败
|
||||
return;
|
||||
}
|
||||
// 解析注单数据
|
||||
List<Map<String, Object>> betList = parseBetHtml(content);
|
||||
if (betList.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user