mirror of
https://github.com/Geniusay/ChopperBot.git
synced 2026-06-20 19:56:01 +08:00
虎牙直播爬虫
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package org.example.core.creeper.group;
|
||||
|
||||
import org.example.constpool.ConstGroup;
|
||||
import org.example.constpool.ConstPool;
|
||||
import org.example.core.manager.AbstractCreeperGroup;
|
||||
|
||||
/**
|
||||
* @author dhx
|
||||
* @date 2023/10/10 10:53
|
||||
*/
|
||||
public class HuyaLiveGroup extends AbstractCreeperGroup {
|
||||
@Override
|
||||
public String getPlatform() {
|
||||
return ConstPool.HUYA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return ConstGroup.LIVE_ONLINE;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package org.example.core.creeper.loadconfig;
|
||||
import lombok.Data;
|
||||
import org.example.constpool.ConstGroup;
|
||||
import org.example.constpool.ConstPool;
|
||||
import org.example.core.creeper.loadtask.DouyuLiveOnlineLoadTask;
|
||||
import org.example.core.creeper.loadtask.HuyaLiveOnlineLoadTask;
|
||||
import org.example.core.manager.Creeper;
|
||||
|
||||
/**
|
||||
@@ -12,7 +12,7 @@ import org.example.core.manager.Creeper;
|
||||
*/
|
||||
@Data
|
||||
@Creeper(creeperName = "虎牙直播爬虫",
|
||||
loadTask = DouyuLiveOnlineLoadTask.class,
|
||||
loadTask = HuyaLiveOnlineLoadTask.class,
|
||||
creeperDescription = "虎牙直播爬取(包含监控器)",
|
||||
priority = 10,
|
||||
group = ConstGroup.LIVE_ONLINE,
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.example.core.creeper.loadtask;
|
||||
|
||||
|
||||
import org.example.core.VideoTaskMonitor;
|
||||
import org.example.core.creeper.loadconfig.HuyaLiveOnlineConfig;
|
||||
import org.example.core.taskmonitor.Monitor;
|
||||
|
||||
/**
|
||||
* @author dhx
|
||||
* @date 2023/10/10 10:48
|
||||
*/
|
||||
@Monitor(clazz = VideoTaskMonitor.class)
|
||||
public class HuyaLiveOnlineLoadTask extends LiveOnlineLoadTask{
|
||||
public HuyaLiveOnlineLoadTask(HuyaLiveOnlineConfig huyaLiveOnlineConfig) {
|
||||
super(huyaLiveOnlineConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String start() {
|
||||
return this.start(logger,(HuyaLiveOnlineConfig)loadConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void end() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user