当前位置:网站首页>虎牙自动发弹幕换牌子
虎牙自动发弹幕换牌子
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 欢迎讨论交流
边栏推荐
- 虚拟地址空间
- 文件IO-缓冲区
- BM7 list entry in central
- Distribution Network Expansion Planning: Consider Decisions Using Probabilistic Energy Production and Consumption Profiles (Matlab Code Implementation)
- STL-deque
- Lambda
- Spark基础【RDD转换算子】
- STL-stack
- port forwarding
- Black cats take you learn Makefile article 13: a Makefile collection compile problem
猜你喜欢
阿里云贾朝辉:云XR平台支持彼真科技呈现国风科幻虚拟演唱会
链表相加(二)
这款可视化工具神器,更直观易用!太爱了
如何利用fiddler连接手机抓包APP
LeetCode Daily 2 Questions 02: Reverse the words in a string (1200 each)
DC-8靶场下载及渗透实战详细过程(DC靶场系列)
金山云CEO王育林离职:正值冲刺港股之际 雷军曾送金砖
自学软件测试不知道该如何学起,【软件测试技能图谱|自学测试路线图】
RK3399 platform development series explanation (kernel-driven peripherals) 6.35, IAM20680 gyroscope introduction
瑞幸咖啡第二季营收33亿:门店达7195家 更换CFO
随机推荐
Redis
RecyclerView滑动监听
DC-9靶场下载及渗透实战详细过程(DC靶场系列)
Black cats take you learn Makefile article 13: a Makefile collection compile problem
pytorch手撕CNN
高数_复习_第5章:多元函数微分学
自学软件测试不知道该如何学起,【软件测试技能图谱|自学测试路线图】
This visual tool artifact is more intuitive and easy to use!love so much
BM7 list entry in central
分享一个后台管理系统可拖拽式组件的设计思路
今日睡眠质量记录75分
阿里云新增三大高性能计算解决方案,助力生命科学行业快速发展
IM 即时通讯开发如何设计图片文件的服务端存储架构
特别的三杯鸡
美味石井饭菜
MySQL学习笔记(1)——基础操作
OneNote 教程,如何在 OneNote 中整理笔记本?
OneNote tutorial, how to organize notebooks in OneNote?
元宇宙社交应用,靠什么吸引用户「为爱发电」?
STL-deque