Skip to content

Commit 1777ee3

Browse files
committed
将最开始的那两个字节改为00 60,这样稳定
1 parent 0e6ad42 commit 1777ee3

File tree

6 files changed

+269
-156
lines changed

6 files changed

+269
-156
lines changed

CrawlDouyuDanmu/.idea/workspace.xml

Lines changed: 81 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CrawlDouyuDanmu/src/main/resources/config.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#要抓取的斗鱼房间网址
2-
url = http://www.douyutv.com/cave
2+
url = http://www.douyutv.com/301712
33

44
#一开始通讯的服务器,不是弹幕服务器,弹幕服务器地址是与这个服务器通讯后返回的(抓包得到这个地址)
55
serverIP = 119.90.49.93

CrawlPandaDanmu/.idea/workspace.xml

Lines changed: 184 additions & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CrawlPandaDanmu/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
PandaTV弹幕抓取工具
22

3-
直接运行main就行,有时候打开会遇到Connection reset异常,但很少见,如果遇到,重新运行就行了
3+
直接运行main就行

CrawlPandaDanmu/src/main/java/Crawl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void login() throws IOException {
105105
socket = new Socket(serverIp,port);
106106
System.out.println("登录弹幕服务器:" + serverIp + ":" + port);
107107
ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
108-
byte[] b = new byte[]{0x00, 0x06, 0x00, 0x02, 0x00, 0x61};
108+
byte[] b = new byte[]{0x00, 0x06, 0x00, 0x02, 0x00, 0x60};
109109
byteArray.write(b);
110110

111111
String msg = "u:" + rid + "@" + appid + "\n" +
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#要抓取的熊猫房间ID
2-
roomId = 224588
2+
roomId = 11991

0 commit comments

Comments
 (0)