Before the WS service is started and the data is not captured
Start the WS service, fill in the address of the live broadcast room, and start scraping data
In the future, you can establish a socket.io connection with the current collection terminal to consume barrage data, and there are the following types of barrage messages: user entry, user like, user comment, user gift, the following message formats are explained in detail
Common Data Structure:
/**
* Message type, WebcastMemberMessage: Chat message
*/
private String method;
/**
* Episode ID
*/
private String roomId;
/**
* Security ID (unique to each user, through which the unique user can be identified)
*/
private String secUid;
/**
* Tik Tok account
*/
private String displayId;
/**
*nickname
*/
private String nickName;
/**
* Gender: 0: Female, 1: Male, 2: Unknown
*/
private Integer gender;
/**
* Avatar address
*/
private String avatar;
/**
* Honorary Grade
*/
private Integer level;
/**
* Fan club level
*/
private Integer fansLevel;
/**
* Follow status, 0: Not Following, 1: Following
*/
private Integer followStatus;
/**
*timestamp
*/
private Long timestamp = System.currentTimeMillis();
1. The user enters
Same as with generic data structures
2. Users like
On top of the common data structure + the following fields:
/**
* Number of likes
*/
private Long count;
/**
* The total number of likes in the live broadcast room
*/
private Long total;
3. User reviews
On top of the common data structure + the following fields:
/**
* Chat content
*/
private String content;
4. User gifts
On top of the common data structure + the following fields:
/**
* Gift ID
*/
private Long giftId;
/**
* Name of the gift
*/
private String giftName;
/**
* Jitter value
*/
private Integer price = -1;
/**
* Number of duplicates
*/
private Integer repeatCount;
/**
* Number of combos
*/
private Integer comboCount;
For the specific gift ID, please refer to the class: GiftMappingConfig
Tips: The first time you need to download the Chrome.zip, and then unzip it to the C:douyin directory, and the final directory is: C:douyinChrome
Chrome.zip download address: Download