当前位置:网站首页>虎牙自动发弹幕换牌子
虎牙自动发弹幕换牌子
2022-08-10 22:23:00 【noobmantest】
虎牙自动发弹幕换牌子
弹幕不受虎牙限制
温馨提示:需要电脑上安装Chrome浏览器
联系我:QQ2039808149 (欢迎讨论交流)
运行截图
运行流程:
- 输入主播房间号
- 输入想要发送的弹幕
- 进入同时切换牌子
- 点击开始发送弹幕,在弹幕框中随机选择一条弹幕发送。速度大概是1条/s。可设置发送不受虎牙限制
- 点击发送停止即可停止。
使用selenium模拟点击,物理脚本,比较可靠。缺点就是比较消耗电脑资源,多个账号同时登录比比较卡顿
部分代码:
@Slf4j
public class MainGUI {
/* * * 管理员端的界面 */
JFrame mainFrame = new JFrame();
JTable userTable;
Object[] usersTableTitle = {
"编号", "标记", "是否可用", "cookie"};
Object[][] users;
// 主播和直播间信息
ArrayList<String> anchorsMessage = new ArrayList<>();
ArrayList<BarrageAndRoomNum> barrageAndRoomNumList = Init.barrageAndRoomNumList;
JPanel rightContent, leftContent;
JButton addUserButton, startSend, enterAnchorRoom, stopSend, safeStatus, safeUsers, delCurStatus, delUser;
Box leftBox;
JTextField anchorNum, delUserNum;
JTextArea barrages;
public JComboBox<String> changeAnchor;
public MainGUI() {
init();
addListener();
mainFrame.setVisible(true);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// 关闭窗口退出程序
mainFrame.setBounds(500, 200, 700, 490);
mainFrame.setTitle("管理员界面");
updateUserInfo();
updateAnchorAndMessage();
}
void init() {
// 左侧菜单栏
leftBox = Box.createVerticalBox();
// 主播信息
changeAnchor = new JComboBox(anchorsMessage.toArray());
leftBox.add(changeAnchor);
leftBox.add(Box.createVerticalStrut(30));
addUserButton = new JButton("录入用户");
addUserButton.setFont(new Font("宋体", Font.BOLD, 15));
leftBox.add(addUserButton);
leftBox.add(Box.createVerticalStrut(30));
JLabel anchorLabel = new JLabel("主播房间号:");
anchorLabel.setFont(new Font("宋体", Font.BOLD, 15));
anchorNum = new JTextField();
anchorNum.setPreferredSize(new Dimension(30, 50));
anchorNum.setFont(new Font("宋体", Font.BOLD, 25));
leftBox.add(anchorLabel);
leftBox.add(anchorNum);
leftBox.add(Box.createVerticalStrut(30));
enterAnchorRoom = new JButton("进入&切换牌子");
enterAnchorRoom.setFont(new Font("宋体", Font.BOLD, 15));
leftBox.add(enterAnchorRoom);
leftBox.add(Box.createVerticalStrut(30));
startSend = new JButton("开始发送弹幕");
startSend.setFont(new Font("宋体", Font.BOLD, 15));
leftBox.add(startSend);
leftBox.add(Box.createVerticalStrut(30));
stopSend = new JButton("停止发送弹幕");
stopSend.setFont(new Font("宋体", Font.BOLD, 15));
leftBox.add(stopSend);
leftBox.add(Box.createVerticalStrut(30));
Box box2 = Box.createHorizontalBox();
box2.add(Box.createHorizontalStrut(8));
box2.add(leftBox); //左边的按钮部分用 box布局
leftContent = new JPanel();
// leftContent.setPreferredSize(new Dimension(250, 0)); //使用该方法
leftContent.setLayout(new BorderLayout());
leftContent.add(box2, BorderLayout.NORTH);
// 右侧表格
users = new Object[10][usersTableTitle.length];
userTable = new JTable(users, usersTableTitle);//组件的创建
// userTable.setEnabled(false);
JScrollPane scrollPane = new JScrollPane(userTable);
rightContent = new JPanel();
rightContent.setLayout(new BorderLayout());
rightContent.add(new JLabel("用户列表"), BorderLayout.BEFORE_FIRST_LINE);
rightContent.add(scrollPane, BorderLayout.CENTER);//把表格 放jpanel5里
// 右下弹幕输入
barrages = new JTextArea(10, 40);
barrages.setLineWrap(true);
barrages.setFont(new Font("宋体", Font.BOLD, 15));
barrages.setText("666");
JScrollPane barragesScrollPane = new JScrollPane(barrages);
barragesScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);// 设置滚动条
barragesScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);// 设置滚动条
Box rightBottomBox = Box.createHorizontalBox();
safeStatus = new JButton("保存弹幕");
safeStatus.setFont(new Font("宋体", Font.BOLD, 15));
rightBottomBox.add(safeStatus);
delCurStatus = new JButton("删除当前弹幕");
delCurStatus.setFont(new Font("宋体", Font.BOLD, 15));
rightBottomBox.add(delCurStatus);
delUserNum = new JTextField();
delUserNum.setPreferredSize(new Dimension(10, 20));
delUserNum.setFont(new Font("宋体", Font.BOLD, 15));
rightBottomBox.add(delUserNum);
delUser = new JButton("删除用户");
delUser.setFont(new Font("宋体", Font.BOLD, 15));
rightBottomBox.add(delUser);
safeUsers = new JButton("保存用户");
safeUsers.setFont(new Font("宋体", Font.BOLD, 15));
rightBottomBox.add(safeUsers);
Box barragesBox = Box.createVerticalBox();
barragesBox.add(barragesScrollPane, BorderLayout.SOUTH);
barragesBox.add(rightBottomBox);
rightContent.add(barragesBox, BorderLayout.SOUTH);
mainFrame.setLayout(new BorderLayout());
mainFrame.add(rightContent, BorderLayout.EAST);
mainFrame.add(leftContent, BorderLayout.WEST);//把两个大的panel放到窗口里面
}
}
联系我QQ 2039808149 欢迎讨论交流
边栏推荐
- Nodes in the linked list are flipped in groups of k
- Glide缓存核心原理详解
- leetcode:355. 设计推特
- Fatal error: cstring: No such file or directory
- Research on multi-element N-k fault model of power system based on AC power flow (implemented by Matlab code) [Power System Fault]
- 阿里云张新涛:支持沉浸式体验应用快速落地,阿里云云XR平台发布
- MySQL Advanced Commands
- 德科立科创板上市:年营收7.3亿 市值59亿
- 68: Chapter 6: Develop article services: 1: Content sorting; article table introduction; creating [article] article services;
- Detailed installation steps and environment configuration of geemap
猜你喜欢
How many threads does LabVIEW allocate?
BM7 链表中环的入口结点
Leave a message with a prize | OpenBMB x Tsinghua University NLP: The update of the large model open class is complete!
IM 即时通讯开发如何设计图片文件的服务端存储架构
瑞幸咖啡第二季营收33亿:门店达7195家 更换CFO
QT笔记——vs + qt 创建一个带界面的 dll 和 调用带界面的dll
Glide监听Activity生命周期源码分析
How to translate financial annual report, why choose a professional translation company?
RecyclerView滑动监听
RK3399 platform development series explanation (kernel-driven peripherals) 6.35, IAM20680 gyroscope introduction
随机推荐
"DevOps Night Talk" - Pilot - Introduction to CNCF Open Source DevOps Project DevStream - feat. PMC member Hu Tao
pytorch tear CNN
uni-app微信小程序——下拉多选框
Merge k sorted linked lists
配电网络扩展规划:考虑使用概率性能源生产和消费概况的决策(Matlab代码实现)
LeetCode Daily 2 Questions 01: Reverse Strings (both 1200) Method: Double Pointer
VulnHub之DC靶场下载与DC靶场全系列渗透实战详细过程
Distribution Network Expansion Planning: Consider Decisions Using Probabilistic Energy Production and Consumption Profiles (Matlab Code Implementation)
VLAN huawei 三种模式
win系统下pytorch深度学习环境安装
ASCII, Unicode and UTF-8
RecyclerView上下滑动时,不调用onBindViewHolder 导致列表的item不刷新
链表中的节点每k个一组翻转
Spark基础【RDD转换算子】
自学软件测试不知道该如何学起,【软件测试技能图谱|自学测试路线图】
The Thread State,
How to be a Righteous Hacker?What should you study?
高学历毕业生,该学单片机还是plc?
谁是边缘计算服务的采购者?是这六个关键角色
y93.第六章 微服务、服务网格及Envoy实战 -- Envoy配置(四)