{"id":28472878,"url":"https://github.com/fqrabbit/getbilibilirtmpcode","last_synced_at":"2025-07-02T01:30:56.080Z","repository":{"id":295671375,"uuid":"972050614","full_name":"FQrabbit/getBiliBiliRTMPCode","owner":"FQrabbit","description":"解决粉丝数少的用户无法在网页开播获取推流码用OBS直播","archived":true,"fork":false,"pushed_at":"2025-06-03T12:04:25.000Z","size":939,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T11:34:50.267Z","etag":null,"topics":["bilibili-live","rtmp-streaming"],"latest_commit_sha":null,"homepage":"https://link.bilibili.com/p/center/index#/my-room/start-live","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FQrabbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-24T13:10:31.000Z","updated_at":"2025-06-03T12:06:40.000Z","dependencies_parsed_at":"2025-05-26T19:51:34.510Z","dependency_job_id":"0db9a7f0-6522-4c4c-8138-25ab0e25a40a","html_url":"https://github.com/FQrabbit/getBiliBiliRTMPCode","commit_stats":null,"previous_names":["fqrabbit/getbilibilirtmpcode"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/FQrabbit/getBiliBiliRTMPCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FQrabbit%2FgetBiliBiliRTMPCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FQrabbit%2FgetBiliBiliRTMPCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FQrabbit%2FgetBiliBiliRTMPCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FQrabbit%2FgetBiliBiliRTMPCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FQrabbit","download_url":"https://codeload.github.com/FQrabbit/getBiliBiliRTMPCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FQrabbit%2FgetBiliBiliRTMPCode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263059510,"owners_count":23407371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bilibili-live","rtmp-streaming"],"created_at":"2025-06-07T11:30:39.438Z","updated_at":"2025-07-02T01:30:56.069Z","avatar_url":"https://github.com/FQrabbit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 已经改去修复弹幕库用了，此项目Archive了\n而且也很好用，我也修复了连接弹幕问题和开播请求问题，晚点发release里\n\n\n---\n\n# B站直播推流码获取工具\n\n## 🍕功能说明\n本工具用于获取B站直播的推流码（RTMP地址和串流密钥），~~方便开发者调试直播相关功能~~。\n\n## ❤️使用方法\n\n### 第一步：获取Cookie\n1. 打开B站直播后台页面：[https://link.bilibili.com/p/center/index#/my-room/start-live](https://link.bilibili.com/p/center/index#/my-room/start-live)\n2. 按 `F12` 或 `Ctrl+Shift+I` 打开开发者工具\n3. 切换到 **Network（网络）** 选项卡\n4. 刷新页面（`F5`）\n5. 在请求列表中找到任意一个 `POST` 请求（大部分`Get`请求亦可）\n6. 点击该请求，在 **Headers（标头）** 中找到 `Cookie` 字段\n7. 复制整个Cookie字符串（从`buvid3=`开始到结尾）\n![获取Cookie示例图](/doc/cookie.png)\n### 第二步：运行程序   \n将复制的Cookie粘贴到程序输入中，并填写房间号(长房间号)，点击锁定，选择开播。\n![程序界面](/doc/GUI.png)\n\n\n## 🖥️ 命令行使用方法\n嫌弃GUI太臃肿?而且也安装了python\n## 📦 依赖安装\n**必须安装 `requests` 模块**：\n```bash\npip install requests\n```\n\n---\n\n### 1. 修改配置文件\n在运行前，请编辑 `getBiliBiliRTMPCode_CLI.py` 文件：\n- **填写你的 Cookie**：替换 `common_cookies = \"\"` 中的内容（需用双引号包裹）。\n- **修改房间号**：将 `start_data` 和 `stop_data` 中的 `room_id` 改为你的直播间长房间号。\n\n### 2. 执行命令\n支持两种操作：\n```bash\n# 开播（获取推流码）\npython getBiliBiliRTMPCode_CLI.py start\n\n# 关播\npython getBiliBiliRTMPCode_CLI.py stop\n```\n\n---\n\n## 💡 输出示例\n成功开播后会显示如下信息：\n```\n=== 直播推流信息 ===\n1. RTMP地址: rtmp://xxxxx\n2. 推流码: xxxxx\n3. 完整推流地址: rtmp://xxxxx/xxxxx\n4. 运营商: 电信\n5. 身份码: xxxxx\n```\n\n---\n\n## ⚠️ 注意事项\n1. **Cookie 安全**：\n   - 不要泄露你的 Cookie！它等同于账号密码。\n   - 使用后建议清除文件中的 Cookie 或妥善保存脚本。\n\n2. **房间号**：\n   - 确保 `start_data` 和 `stop_data` 中的 `room_id` 一致。\n\n3. **错误处理**：\n   - 如果开播失败，会直接返回 B站API 的原始错误信息。\n\n\n\n## 手动编译GUI指南\n\n### 环境要求\n- Python 3.10+\n- PyInstaller\n\n### 编译步骤\n```bash\n# 安装依赖\npip install pyinstaller requests pyperclip\n\n# 单文件打包（推荐）\npyinstaller --onefile --windowed --name getBiliBiliRTMPCode getBiliBiliRTMPCode.py\n\n# 生成的EXE文件位于 dist/ 目录下\n```\n\n---\n\n## 免责声明\n\n⚠️ **法律与道德声明**\n1. 本工具仅限**技术学习与研究**用途，禁止用于任何违反哔哩哔哩用户协议的行为\n2. 开发者不对滥用本工具造成的账号封禁等后果负责\n3. 请勿将获取的推流码用于未授权的多平台转播等违规行为\n4. 根据《计算机软件保护条例》，使用者需自行承担法律风险\n\n**重要提示**：\n哔哩哔哩直播推流码属于敏感信息，请遵守[《哔哩哔哩直播服务协议》](https://live.bilibili.com/p/html/live-app-help/index.html#/live-protocol)。持续高频访问接口可能导致账号风控，请谨慎使用。\n\n---\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffqrabbit%2Fgetbilibilirtmpcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffqrabbit%2Fgetbilibilirtmpcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffqrabbit%2Fgetbilibilirtmpcode/lists"}