chore: remove local douyu debug artifacts from repo

This commit is contained in:
liuwei
2026-04-08 17:05:37 +08:00
parent 867ed0a2ec
commit cf675db2da
14 changed files with 0 additions and 21045 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,649 +0,0 @@
{
"room_id": "52876",
"message_count": 6984,
"deduped_message_count": 6981,
"unique_user_count": 2929,
"top_terms": [
{
"term": "bkb",
"count": 97
},
{
"term": "甲哥",
"count": 31
},
{
"term": "连胜",
"count": 30
},
{
"term": "瘟鸡光环",
"count": 30
},
{
"term": "doom",
"count": 28
},
{
"term": "zsmj",
"count": 26
},
{
"term": "分钟",
"count": 22
},
{
"term": "dota",
"count": 19
},
{
"term": "了吧",
"count": 17
},
{
"term": "哈哈哈哈哈哈",
"count": 16
},
{
"term": "哈哈哈哈",
"count": 16
},
{
"term": "一愣的",
"count": 15
},
{
"term": "卧槽",
"count": 14
},
{
"term": "最后机会了",
"count": 12
},
{
"term": "尽力了",
"count": 11
}
],
"burst_terms": [
{
"text": "",
"count": 38,
"user_count": 36
},
{
"text": "哈哈哈",
"count": 26,
"user_count": 18
},
{
"text": ".",
"count": 17,
"user_count": 17
},
{
"text": "1",
"count": 16,
"user_count": 14
},
{
"text": "gg",
"count": 14,
"user_count": 14
},
{
"text": "。。。",
"count": 13,
"user_count": 7
},
{
"text": "",
"count": 12,
"user_count": 12
},
{
"text": "最后机会了",
"count": 12,
"user_count": 12
},
{
"text": "哈哈哈哈",
"count": 12,
"user_count": 11
},
{
"text": "秀没了啊",
"count": 11,
"user_count": 11
}
],
"peak_buckets": [
{
"start_time": "2026-04-07 21:55:00",
"message_count": 179,
"user_count": 94,
"top_terms": [
{
"term": "bkb",
"count": 15
},
{
"term": "冲水",
"count": 10
},
{
"term": "diff",
"count": 3
},
{
"term": "舒服",
"count": 2
},
{
"term": "号位",
"count": 2
},
{
"term": "show",
"count": 2
},
{
"term": "sir",
"count": 2
},
{
"term": "换成盘子就好",
"count": 2
}
],
"burst_terms": [
{
"text": "舒服",
"count": 2,
"user_count": 2
},
{
"text": "",
"count": 2,
"user_count": 2
},
{
"text": "为毛不出盘子",
"count": 1,
"user_count": 1
},
{
"text": "突破口?",
"count": 1,
"user_count": 1
},
{
"text": "虚空就等你啊",
"count": 1,
"user_count": 1
}
],
"sample_messages": [
{
"time": "2026-04-07 21:55:22",
"nickname": "一米幻影",
"content": "今天全胜nb"
},
{
"time": "2026-04-07 21:56:42",
"nickname": "椰子米",
"content": "搞个盘子"
},
{
"time": "2026-04-07 21:57:58",
"nickname": "1刀一个小朋友",
"content": "飞的好啊"
},
{
"time": "2026-04-07 21:58:24",
"nickname": "夏半仙Zzz",
"content": "手活没了"
},
{
"time": "2026-04-07 21:59:59",
"nickname": "蜻蜓队长zzzzzzzzzzz",
"content": "那你不出盘子?"
}
]
},
{
"start_time": "2026-04-07 22:00:00",
"message_count": 128,
"user_count": 66,
"top_terms": [
{
"term": "bkb",
"count": 11
},
{
"term": "炼金",
"count": 4
},
{
"term": "你数学幼儿园",
"count": 3
},
{
"term": "就行了",
"count": 2
},
{
"term": "你血精石干嘛",
"count": 2
},
{
"term": "用的",
"count": 2
},
{
"term": "说血精石的下",
"count": 2
},
{
"term": "个游戏",
"count": 2
}
],
"burst_terms": [
{
"text": "炼金",
"count": 2,
"user_count": 1
},
{
"text": "居然输了",
"count": 1,
"user_count": 1
},
{
"text": "力竭了",
"count": 1,
"user_count": 1
},
{
"text": "不如冰甲紫苑",
"count": 1,
"user_count": 1
},
{
"text": "就是缺输出呀",
"count": 1,
"user_count": 1
}
],
"sample_messages": [
{
"time": "2026-04-07 22:00:01",
"nickname": "夕立哥DY",
"content": "居然输了"
},
{
"time": "2026-04-07 22:00:50",
"nickname": "跳呀丶跳呀跳",
"content": "换个🐏那个虚空多死两次就完了"
},
{
"time": "2026-04-07 22:01:42",
"nickname": "我炸了啊大哥",
"content": "火猫两个命石都没了,能不弱嘛"
},
{
"time": "2026-04-07 22:03:01",
"nickname": "蜻蜓队长zzzzzzzzzzz",
"content": "出个羊刀对面吹风也没用,蓝猫和虚空也很怕🐏"
},
{
"time": "2026-04-07 22:04:55",
"nickname": "吃鱼小能手丶",
"content": "上把就是血精的问题自己技能释放和切入不行就出羊再不济出个紫苑打虚空和蓝猫也好"
}
]
},
{
"start_time": "2026-04-07 21:05:00",
"message_count": 123,
"user_count": 84,
"top_terms": [
{
"term": "享受",
"count": 7
},
{
"term": "bkb",
"count": 7
},
{
"term": "甲哥",
"count": 6
},
{
"term": "瘟鸡光环",
"count": 6
},
{
"term": "lol",
"count": 4
},
{
"term": "马甲",
"count": 4
},
{
"term": "可以带老板了",
"count": 3
},
{
"term": "mvp",
"count": 3
}
],
"burst_terms": [
{
"text": "炼金什么玩意",
"count": 1,
"user_count": 1
},
{
"text": "炼金太费了",
"count": 1,
"user_count": 1
},
{
"text": "融化了",
"count": 1,
"user_count": 1
},
{
"text": "",
"count": 1,
"user_count": 1
},
{
"text": "竟然还三路",
"count": 1,
"user_count": 1
}
],
"sample_messages": [
{
"time": "2026-04-07 21:05:01",
"nickname": "Vermouthlol",
"content": "这一身出的什么杂技装备啊"
},
{
"time": "2026-04-07 21:06:25",
"nickname": "又是一个灌水",
"content": "这种局我一般就直接退了,影响心情"
},
{
"time": "2026-04-07 21:06:50",
"nickname": "毒狼10号",
"content": "这种局节奏挺慢的、"
},
{
"time": "2026-04-07 21:07:16",
"nickname": "wanll",
"content": "你这样赢,让弹幕怎么喷?"
},
{
"time": "2026-04-07 21:09:52",
"nickname": "猫猫哥的女粉丝",
"content": "我云玩家 @A别喷了吧我说句实话钻粉群很需要你"
}
]
},
{
"start_time": "2026-04-07 21:35:00",
"message_count": 123,
"user_count": 79,
"top_terms": [
{
"term": "大哥炼金现在",
"count": 5
},
{
"term": "诶你别皮",
"count": 3
},
{
"term": "感动",
"count": 3
},
{
"term": "我是真问",
"count": 3
},
{
"term": "养几把",
"count": 3
},
{
"term": "再出自己装备",
"count": 3
},
{
"term": "你有",
"count": 2
},
{
"term": "是先养几把",
"count": 2
}
],
"burst_terms": [
{
"text": "",
"count": 3,
"user_count": 3
},
{
"text": "早点飞啊",
"count": 2,
"user_count": 1
},
{
"text": "t",
"count": 2,
"user_count": 2
},
{
"text": "翻了翻了",
"count": 2,
"user_count": 2
},
{
"text": "意思要9连胜",
"count": 1,
"user_count": 1
}
],
"sample_messages": [
{
"time": "2026-04-07 21:35:19",
"nickname": "清源子墨",
"content": "意思要9连胜"
},
{
"time": "2026-04-07 21:37:22",
"nickname": "诶你别皮",
"content": "兄弟我是真问大哥炼金现在养几把a再出自己装备"
},
{
"time": "2026-04-07 21:38:22",
"nickname": "里黑里",
"content": "对面阵容没了啊,后期全被克"
},
{
"time": "2026-04-07 21:39:06",
"nickname": "風初定",
"content": "t"
},
{
"time": "2026-04-07 21:39:51",
"nickname": "风起梧桐",
"content": "你的火猫真的辣啊"
}
]
},
{
"start_time": "2026-04-07 12:40:00",
"message_count": 121,
"user_count": 73,
"top_terms": [
{
"term": "doom",
"count": 5
},
{
"term": "召唤小僵尸",
"count": 3
},
{
"term": "什么东西减攻",
"count": 2
},
{
"term": "哈哈哈哈哈哈",
"count": 2
},
{
"term": "化身骷髅王",
"count": 2
},
{
"term": "秀的头皮脱落",
"count": 2
},
{
"term": "号位",
"count": 2
},
{
"term": "不吃黑龙",
"count": 2
}
],
"burst_terms": [
{
"text": "sb",
"count": 4,
"user_count": 4
},
{
"text": "化身骷髅王",
"count": 2,
"user_count": 2
},
{
"text": "秀的头皮脱落",
"count": 2,
"user_count": 2
},
{
"text": "召唤小僵尸",
"count": 2,
"user_count": 2
},
{
"text": "不吃黑龙?",
"count": 2,
"user_count": 2
}
],
"sample_messages": [
{
"time": "2026-04-07 12:40:00",
"nickname": "我炸了啊大哥",
"content": "66攻击力也能不要"
},
{
"time": "2026-04-07 12:42:09",
"nickname": "我炸了啊大哥",
"content": "哈哈哈哈哈哈"
},
{
"time": "2026-04-07 12:42:32",
"nickname": "你别好奇",
"content": "装最会切的,在那就切呗"
},
{
"time": "2026-04-07 12:43:40",
"nickname": "EternalDZW",
"content": "吃人马,抬手和范围都比蛤蟆叼"
},
{
"time": "2026-04-07 12:44:54",
"nickname": "日落尤其温柔lsj",
"content": "四级踩啊"
}
]
}
],
"representative_messages": [
{
"time": "2026-04-07 21:55:22",
"nickname": "一米幻影",
"content": "今天全胜nb"
},
{
"time": "2026-04-07 21:56:42",
"nickname": "椰子米",
"content": "搞个盘子"
},
{
"time": "2026-04-07 21:57:58",
"nickname": "1刀一个小朋友",
"content": "飞的好啊"
},
{
"time": "2026-04-07 21:58:24",
"nickname": "夏半仙Zzz",
"content": "手活没了"
},
{
"time": "2026-04-07 21:59:59",
"nickname": "蜻蜓队长zzzzzzzzzzz",
"content": "那你不出盘子?"
},
{
"time": "2026-04-07 22:00:01",
"nickname": "夕立哥DY",
"content": "居然输了"
},
{
"time": "2026-04-07 22:00:50",
"nickname": "跳呀丶跳呀跳",
"content": "换个🐏那个虚空多死两次就完了"
},
{
"time": "2026-04-07 22:01:42",
"nickname": "我炸了啊大哥",
"content": "火猫两个命石都没了,能不弱嘛"
},
{
"time": "2026-04-07 22:03:01",
"nickname": "蜻蜓队长zzzzzzzzzzz",
"content": "出个羊刀对面吹风也没用,蓝猫和虚空也很怕🐏"
},
{
"time": "2026-04-07 22:04:55",
"nickname": "吃鱼小能手丶",
"content": "上把就是血精的问题自己技能释放和切入不行就出羊再不济出个紫苑打虚空和蓝猫也好"
},
{
"time": "2026-04-07 21:05:01",
"nickname": "Vermouthlol",
"content": "这一身出的什么杂技装备啊"
},
{
"time": "2026-04-07 21:06:25",
"nickname": "又是一个灌水",
"content": "这种局我一般就直接退了,影响心情"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,649 +0,0 @@
{
"room_id": "7718843",
"message_count": 8945,
"deduped_message_count": 8938,
"unique_user_count": 2677,
"top_terms": [
{
"term": "zcj",
"count": 112
},
{
"term": "bkb",
"count": 105
},
{
"term": "闭目不语任由",
"count": 61
},
{
"term": "你就忍心一辈",
"count": 59
},
{
"term": "哈哈哈哈哈哈",
"count": 55
},
{
"term": "哈哈哈哈",
"count": 52
},
{
"term": "小丑",
"count": 48
},
{
"term": "bot",
"count": 45
},
{
"term": "yyf",
"count": 44
},
{
"term": "是你吗",
"count": 42
},
{
"term": "你声音好像强",
"count": 41
},
{
"term": "怎么回事强子",
"count": 41
},
{
"term": "你是个人吗强",
"count": 41
},
{
"term": "是汗",
"count": 38
},
{
"term": "强醋摸了摸裤",
"count": 38
}
],
"burst_terms": [
{
"text": "",
"count": 113,
"user_count": 86
},
{
"text": "哈哈哈哈",
"count": 45,
"user_count": 33
},
{
"text": "哈哈哈",
"count": 43,
"user_count": 31
},
{
"text": "gg",
"count": 31,
"user_count": 27
},
{
"text": "sb",
"count": 31,
"user_count": 24
},
{
"text": "bot",
"count": 23,
"user_count": 21
},
{
"text": "哈哈",
"count": 23,
"user_count": 16
},
{
"text": "。。。",
"count": 20,
"user_count": 17
},
{
"text": "",
"count": 19,
"user_count": 19
},
{
"text": "小丑",
"count": 19,
"user_count": 16
}
],
"peak_buckets": [
{
"start_time": "2026-04-07 00:45:00",
"message_count": 412,
"user_count": 220,
"top_terms": [
{
"term": "bot",
"count": 14
},
{
"term": "see",
"count": 10
},
{
"term": "hao",
"count": 9
},
{
"term": "声带被小小的",
"count": 8
},
{
"term": "大棍子捅好了",
"count": 8
},
{
"term": "最重要的是",
"count": 8
},
{
"term": "哈哈哈哈哈哈",
"count": 7
},
{
"term": "啥比",
"count": 7
}
],
"burst_terms": [
{
"text": "bot",
"count": 10,
"user_count": 10
},
{
"text": "",
"count": 5,
"user_count": 5
},
{
"text": "哈哈哈哈哈",
"count": 4,
"user_count": 4
},
{
"text": "噗",
"count": 4,
"user_count": 1
},
{
"text": "哈哈哈哈",
"count": 3,
"user_count": 3
}
],
"sample_messages": [
{
"time": "2026-04-07 00:45:15",
"nickname": "叶落繁花醉",
"content": "一直C"
},
{
"time": "2026-04-07 00:47:18",
"nickname": "jyb7194",
"content": "@A断腿警告小小是你叫的吗叫jk爹"
},
{
"time": "2026-04-07 00:47:52",
"nickname": "落霞与孤鹜齐飞LK",
"content": "菜逼东西"
},
{
"time": "2026-04-07 00:48:13",
"nickname": "ggl73999",
"content": "HAO蠢👉🤡HAO蠢👉🤡HAO蠢👉🤡😂👉🤡😂👉🤡😂👉🤡😂"
},
{
"time": "2026-04-07 00:49:56",
"nickname": "爱在沙漠找贝壳",
"content": "如果您的直播内容是以观看他人操作为主,建议您移步“一起看”分区"
}
]
},
{
"start_time": "2026-04-07 22:45:00",
"message_count": 338,
"user_count": 208,
"top_terms": [
{
"term": "马刺",
"count": 3
},
{
"term": "送了",
"count": 3
},
{
"term": "无能",
"count": 3
},
{
"term": "连空",
"count": 3
},
{
"term": "波高",
"count": 3
},
{
"term": "主播电死你嘟",
"count": 2
},
{
"term": "bug",
"count": 2
},
{
"term": "哈哈哈哈哈",
"count": 2
}
],
"burst_terms": [
{
"text": "sb",
"count": 14,
"user_count": 11
},
{
"text": "",
"count": 8,
"user_count": 7
},
{
"text": "?",
"count": 4,
"user_count": 2
},
{
"text": "波高",
"count": 3,
"user_count": 3
},
{
"text": ".",
"count": 2,
"user_count": 1
}
],
"sample_messages": [
{
"time": "2026-04-07 22:45:06",
"nickname": "frank19422",
"content": "嘴歪眼斜?"
},
{
"time": "2026-04-07 22:46:15",
"nickname": "自律的菜逼",
"content": "是搞笑博主吗"
},
{
"time": "2026-04-07 22:46:58",
"nickname": "phoenix34356",
"content": "无缘无故送"
},
{
"time": "2026-04-07 22:47:53",
"nickname": "飞鸟还是明日香",
"content": "就这也想扣分?"
},
{
"time": "2026-04-07 22:49:58",
"nickname": "我是和蛋蛋",
"content": "秀的自己脑壳疼"
}
]
},
{
"start_time": "2026-04-07 23:45:00",
"message_count": 318,
"user_count": 206,
"top_terms": [
{
"term": "机器人",
"count": 20
},
{
"term": "测试",
"count": 20
},
{
"term": "本条弹幕用以",
"count": 20
},
{
"term": "统计机器人数",
"count": 20
},
{
"term": "非机器人用户",
"count": 20
},
{
"term": "请不要",
"count": 20
},
{
"term": "bkb",
"count": 18
},
{
"term": "原来直播间有",
"count": 15
}
],
"burst_terms": [
{
"text": "gg",
"count": 8,
"user_count": 8
},
{
"text": "g",
"count": 3,
"user_count": 3
},
{
"text": "gggg",
"count": 2,
"user_count": 2
},
{
"text": "长痛",
"count": 2,
"user_count": 2
},
{
"text": "无限!",
"count": 2,
"user_count": 2
}
],
"sample_messages": [
{
"time": "2026-04-07 23:45:00",
"nickname": "玩滑滑梯的熊猫",
"content": "这不杀鸟?"
},
{
"time": "2026-04-07 23:47:14",
"nickname": "Reic衡",
"content": "血晶真不如玲珑心"
},
{
"time": "2026-04-07 23:48:10",
"nickname": "Dy克服潮罐S码",
"content": "gg"
},
{
"time": "2026-04-07 23:48:31",
"nickname": "赏胸悦目",
"content": "秀的野怪一愣一愣"
},
{
"time": "2026-04-07 23:49:59",
"nickname": "余生伴我行m",
"content": "35"
}
]
},
{
"start_time": "2026-04-07 00:55:00",
"message_count": 317,
"user_count": 182,
"top_terms": [
{
"term": "冲水",
"count": 30
},
{
"term": "小丑",
"count": 27
},
{
"term": "刚刚偷看你直",
"count": 19
},
{
"term": "播被老板发现",
"count": 19
},
{
"term": "还好老板是蝙",
"count": 19
},
{
"term": "蝠侠",
"count": 19
},
{
"term": "拍了拍我的肩",
"count": 19
},
{
"term": "膀说继续监视",
"count": 19
}
],
"burst_terms": [
{
"text": "",
"count": 6,
"user_count": 6
},
{
"text": "哈哈哈",
"count": 5,
"user_count": 4
},
{
"text": "小丑",
"count": 5,
"user_count": 5
},
{
"text": "哈哈",
"count": 4,
"user_count": 3
},
{
"text": "bot",
"count": 4,
"user_count": 4
}
],
"sample_messages": [
{
"time": "2026-04-07 00:55:04",
"nickname": "叶落繁花醉",
"content": "秀麻了"
},
{
"time": "2026-04-07 00:57:53",
"nickname": "用户23701668",
"content": "这小小你一辈子玩不出来"
},
{
"time": "2026-04-07 00:58:21",
"nickname": "hyc193",
"content": "你好菜A"
},
{
"time": "2026-04-07 00:58:47",
"nickname": "tracywin",
"content": "没你JACK爹带躺 你这把纯纯小丑东西"
},
{
"time": "2026-04-07 00:59:59",
"nickname": "木头人来啦",
"content": "你这把的表现不值10分"
}
]
},
{
"start_time": "2026-04-07 21:55:00",
"message_count": 315,
"user_count": 207,
"top_terms": [
{
"term": "强子也就是吃",
"count": 10
},
{
"term": "了直播的红利",
"count": 10
},
{
"term": "要是不直播自",
"count": 10
},
{
"term": "己单排",
"count": 10
},
{
"term": "没有弹幕教",
"count": 10
},
{
"term": "一万分都难上",
"count": 10
},
{
"term": "和你有啥关系",
"count": 6
},
{
"term": "蝴蝶",
"count": 6
}
],
"burst_terms": [
{
"text": "",
"count": 4,
"user_count": 4
},
{
"text": "蝴蝶",
"count": 4,
"user_count": 4
},
{
"text": "",
"count": 2,
"user_count": 1
},
{
"text": "和你有关系?",
"count": 2,
"user_count": 2
},
{
"text": "",
"count": 2,
"user_count": 2
}
],
"sample_messages": [
{
"time": "2026-04-07 21:55:02",
"nickname": "五十岚麻巳子",
"content": "那你就查眼蹲队友啊"
},
{
"time": "2026-04-07 21:57:10",
"nickname": "我看川川直播学技术",
"content": "弹幕软柿子能不能别提前开香槟"
},
{
"time": "2026-04-07 21:57:37",
"nickname": "坏人爱吃跳跳糖丶",
"content": "撒旦 无敌了"
},
{
"time": "2026-04-07 21:57:56",
"nickname": "dota辉一生",
"content": "信我们???"
},
{
"time": "2026-04-07 21:59:48",
"nickname": "Guiing",
"content": "兽破小鱼被动 怎么玩"
}
]
}
],
"representative_messages": [
{
"time": "2026-04-07 00:45:15",
"nickname": "叶落繁花醉",
"content": "一直C"
},
{
"time": "2026-04-07 00:47:18",
"nickname": "jyb7194",
"content": "@A断腿警告小小是你叫的吗叫jk爹"
},
{
"time": "2026-04-07 00:47:52",
"nickname": "落霞与孤鹜齐飞LK",
"content": "菜逼东西"
},
{
"time": "2026-04-07 00:48:13",
"nickname": "ggl73999",
"content": "HAO蠢👉🤡HAO蠢👉🤡HAO蠢👉🤡😂👉🤡😂👉🤡😂👉🤡😂"
},
{
"time": "2026-04-07 00:49:56",
"nickname": "爱在沙漠找贝壳",
"content": "如果您的直播内容是以观看他人操作为主,建议您移步“一起看”分区"
},
{
"time": "2026-04-07 22:45:06",
"nickname": "frank19422",
"content": "嘴歪眼斜?"
},
{
"time": "2026-04-07 22:46:15",
"nickname": "自律的菜逼",
"content": "是搞笑博主吗"
},
{
"time": "2026-04-07 22:46:58",
"nickname": "phoenix34356",
"content": "无缘无故送"
},
{
"time": "2026-04-07 22:47:53",
"nickname": "飞鸟还是明日香",
"content": "就这也想扣分?"
},
{
"time": "2026-04-07 22:49:58",
"nickname": "我是和蛋蛋",
"content": "秀的自己脑壳疼"
},
{
"time": "2026-04-07 23:45:00",
"nickname": "玩滑滑梯的熊猫",
"content": "这不杀鸟?"
},
{
"time": "2026-04-07 23:47:14",
"nickname": "Reic衡",
"content": "血晶真不如玲珑心"
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 KiB

View File

@@ -1,88 +0,0 @@
import requests
import time
# ====== 配置 ======
ROOM_ID = "288016" # 👉 改成你要测试的直播间ID
PAGE_LIMIT = 5 # 拉前几页(避免太重)
SLEEP_INTERVAL = 60 # 采样间隔(秒)
HEADERS = {
"User-Agent": "Mozilla/5.0",
"Referer": f"https://www.douyu.com/{ROOM_ID}"
}
def get_room_status(room_id):
"""获取直播状态"""
url = f"https://www.douyu.com/betard/{room_id}"
try:
res = requests.get(url, headers=HEADERS, timeout=5).json()
return res["room"]["show_status"] # 1=直播中, 2=未开播
except Exception as e:
print("获取直播状态失败:", e)
return None
def get_vip_count(room_id, page_limit=3):
"""获取贵宾数量(简单版)"""
vip_users = set()
for page in range(1, page_limit + 1):
url = "https://www.douyu.com/wfs/web/getFansList"
params = {
"roomid": room_id,
"page": page
}
try:
res = requests.get(url, headers=HEADERS, params=params, timeout=5).json()
data = res.get("data", {}).get("list", [])
if not data:
break
for user in data:
noble = user.get("nobleLevel", 0)
if noble and noble > 0:
uid = user.get("uid")
vip_users.add(uid)
except Exception as e:
print(f"{page}页获取失败:", e)
break
return len(vip_users)
def main():
print(f"开始监控直播间: {ROOM_ID}")
last_status = None
while True:
status = get_room_status(ROOM_ID)
if status == 1:
if last_status != 1:
print("🎬 开播了!")
vip_count = get_vip_count(ROOM_ID, PAGE_LIMIT)
now = time.strftime("%H:%M:%S")
print(f"[{now}] 当前贵宾数(估算): {vip_count}")
elif status == 2:
if last_status == 1:
print("🛑 已下播")
else:
print("未开播...")
else:
print("状态获取异常")
last_status = status
time.sleep(SLEEP_INTERVAL)
if __name__ == "__main__":
main()