Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
live-crawler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhiwei
live-crawler
Commits
7c521742
Commit
7c521742
authored
Jan 30, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加readme.md相应说明及添加打包程序
parent
e35fc306
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
178 additions
and
1 deletions
+178
-1
README.md
+125
-1
pom.xml
+53
-0
No files found.
README.md
View file @
7c521742
# 直播平台采集系统
# 直播平台采集系统
# 项目说明:此项目包含
# 项目说明:此项目包含
1.
弹幕采集 (斗鱼、熊猫TV
)
1.
弹幕采集 (斗鱼、熊猫TV
、B站)
2.
房间热度查询 (斗鱼、熊猫TV、虎牙、B站)
2.
房间热度查询 (斗鱼、熊猫TV、虎牙、B站)
# 使用方法请查看相应的测试类
# 使用方法请查看相应的测试类
# 根据房间地址获取房间信息
/
**
*
B站房间信息获取
*
/
@Test
public void getBilibiliRoomInfoByRoomUrl() {
String roomUrl = "https://live.bilibili.com/483";
try {
RoomInfo roomInfo = BilibiliRoomInfoCrawler.getRoomInfoByRoomUrl(roomUrl);
System.out.println("房间信息:::"+ roomInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
/
**
*
斗鱼房间信息获取
*
/
@Test
public void getDouyuRoomInfoByRoomUrl() {
String roomUrl = "https://www.douyu.com/4372875";
try {
RoomInfo roomInfo = DouYuRoomInfoCrawler.getRoomInfoByRoomUrl(roomUrl);
System.out.println("房间信息:::"+ roomInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
/
**
*
虎牙房间信息获取
*
/
@Test
public void getHuYaRoomInfoByRoomUrl() {
String roomUrl = "https://www.huya.com/baishaling";
try {
RoomInfo roomInfo = HuYaRoomInfoCrawler.getRoomInfoByRoomUrl(roomUrl);
System.out.println("房间信息:::"+ roomInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
/
**
*
熊猫TV房间信息获取
*
/
@Test
public void getPandamTVRoomInfoByRoomUrl() {
String roomUrl = "https://www.panda.tv/337852";
try {
RoomInfo roomInfo = PandamTVRoomInfoCrawler.getRoomInfoByRoomUrl(roomUrl);
System.out.println("房间信息:::"+ roomInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
# 根据房间地址获取房间弹幕
/
**
*
B站房间弹幕获取
*
/
@Test
public void getBilibiliDanmu(){
String roomUrl = "https://live.bilibili.com/139";
try {
BilibiliClient.getDanmu(new DataCallBack() {
@Override
public void onData(Object message) {
if(message instanceof BilibiliMessage) {
BilibiliMessage bilibiliMessage = (BilibiliMessage)message;
System.out.println("-------------" + bilibiliMessage.toString());
}
}
}, roomUrl);
} catch (Exception e) {
e.printStackTrace();
}
}
/
**
*
斗鱼房间弹幕获取
*
/
@Test
public void getDouyuDanmu(){
String roomUrl = "https://www.douyu.com/71017";
try {
DouyuClient.getDanmu(new DataCallBack() {
@Override
public void onData(Object message) {
if (message instanceof DouYuMessage) {
DouYuMessage douyuMessage = (DouYuMessage) message;
System.out.println("-------------" + douyuMessage.toString());
}
}
}, roomUrl);
} catch (Exception e) {
e.printStackTrace();
}
}
/
**
*
熊猫TV房间弹幕获取
*
/
@Test
public void getPandamDanmu(){
String roomUrl = "https://www.panda.tv/337852";
try {
PandamClient.getDanmu(new DataCallBack() {
@Override
public void onData(Object message) {
if (message instanceof PandamMessage) {
PandamMessage pandamMessage = (PandamMessage) message;
System.out.println("-------------" + pandamMessage.toString());
}
}
}, roomUrl);
} catch (Exception e) {
e.printStackTrace();
}
}
\ No newline at end of file
pom.xml
View file @
7c521742
...
@@ -28,4 +28,56 @@
...
@@ -28,4 +28,56 @@
<version>
4.1.33.Final
</version>
<version>
4.1.33.Final
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
<!-- 打包管理 -->
<build>
<plugins>
<!-- 发布源码 -->
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
2.4
</version>
<configuration>
<attach>
true
</attach>
</configuration>
<executions>
<execution>
<phase>
compile
</phase>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-javadoc-plugin
</artifactId>
<version>
2.10.4
</version>
</plugin>
<!-- 解决maven test命令时console出现中文乱码乱码 -->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.7.2
</version>
<configuration>
<forkMode>
once
</forkMode>
<argLine>
-Dfile.encoding=UTF-8
</argLine>
</configuration>
</plugin>
</plugins>
</build>
<!-- 分发管理:管理distribution和supporting files -->
<distributionManagement>
<snapshotRepository>
<id>
nexus-releases
</id>
<name>
User Porject Snapshot
</name>
<url>
http://192.168.0.30:8081/nexus/content/repositories/snapshots/
</url>
<uniqueVersion>
true
</uniqueVersion>
</snapshotRepository>
<repository>
<id>
nexus-releases
</id>
<name>
User Porject Release
</name>
<url>
http://192.168.0.30:8081/nexus/content/repositories/releases/
</url>
</repository>
</distributionManagement>
</project>
</project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment