{"id":13486698,"url":"https://github.com/iyear/pure-live-core","last_synced_at":"2025-05-16T14:07:06.032Z","repository":{"id":39923621,"uuid":"435477309","full_name":"iyear/pure-live-core","owner":"iyear","description":"✨ Make Live Pure Again","archived":false,"fork":false,"pushed_at":"2023-02-24T13:35:48.000Z","size":8475,"stargazers_count":1188,"open_issues_count":11,"forks_count":141,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-13T23:55:47.987Z","etag":null,"topics":["bilibili","bilibili-live","douyu","douyulive","huya","live","livestream","twitch"],"latest_commit_sha":null,"homepage":"https://github.com/iyear/pure-live-core","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iyear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-12-06T11:51:54.000Z","updated_at":"2025-05-09T10:36:17.000Z","dependencies_parsed_at":"2024-01-13T16:22:47.233Z","dependency_job_id":"3e210f65-61e0-4993-a909-04662de989c7","html_url":"https://github.com/iyear/pure-live-core","commit_stats":{"total_commits":163,"total_committers":2,"mean_commits":81.5,"dds":"0.018404907975460127","last_synced_commit":"90dd36c6142c5199a091f960268acb9d7bbded9e"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fpure-live-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fpure-live-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fpure-live-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fpure-live-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyear","download_url":"https://codeload.github.com/iyear/pure-live-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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","bilibili-live","douyu","douyulive","huya","live","livestream","twitch"],"created_at":"2024-07-31T18:00:50.009Z","updated_at":"2025-05-16T14:07:06.013Z","avatar_url":"https://github.com/iyear.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"## 🎉 简介\n\n![](https://img.shields.io/github/go-mod/go-version/iyear/pure-live-core?style=flat-square)\n![](https://img.shields.io/badge/license-GPL-lightgrey.svg?style=flat-square)\n![](https://img.shields.io/github/v/release/iyear/pure-live-core?color=red\u0026style=flat-square)\n![](https://img.shields.io/github/last-commit/iyear/pure-live-core?style=flat-square)\n[![Go Report Card](https://goreportcard.com/badge/github.com/iyear/pure-live-core)](https://goreportcard.com/report/github.com/iyear/pure-live-core)\n\n![](https://img.shields.io/github/workflow/status/iyear/pure-live-core/Docker%20Build?label=docker%20build\u0026style=flat-square)\n![](https://img.shields.io/docker/v/iyear/pure-live?label=docker%20tag\u0026style=flat-square)\n![](https://img.shields.io/docker/image-size/iyear/pure-live?style=flat-square\u0026label=docker%20image%20size)\n\n**该项目仅供学习，请勿用于商业用途。任何使用该项目造成的后果由使用者自行承担。**\n\n\u003e 一个想让直播回归纯粹的项目\n\n没有礼物、粉丝团、弹窗，只有直播、弹幕\n\n## ✨ 特性\n\n- 🔎   直播间信息、直播流、弹幕流、发送弹幕\n- ⌛    平台 `Websocket` 协议封装，支持转发弹幕消息、直播间热度消息\n- 🗝️   解决跨域问题，支持直播流本地转发\n- 📂   简易的收藏夹功能支持\n- 🎯   资源占用低，5开百万热度直播间、蓝光直播流转发、弹幕全开占用 `40M` 内存\n- 🧬   跨平台支持，甚至可以运行在路由器上\n- 🔨   支持设置 `Socks5` 代理 (未测试)\n- 🧱   良好的项目结构设计，解耦直播平台和核心功能\n- ⚙️ 同时它也是一个简单的命令行工具。\n\n......\n\n## 🛠️ 部署\n\n### Docker\n\n支持 `amd64` `386` `arm64` `arm/v6` `arm/v7` 架构\n\n```shell\n#启动\ndocker run --name pure-live -p \u003cHOST_PORT\u003e:8800 -d --restart=always iyear/pure-live:latest\n#或添加-v参数\ndocker run --name pure-live -p \u003cHOST_PORT\u003e:8800 -v /HOST/PATH/DATA:/data -v /HOST/PATH/LOG:/log -d --restart=always iyear/pure-live:latest\n\n#查看log\ndocker logs -f pure-live\n\n#设置账户配置文件\ndocker cp PATH/TO/account.yaml pure-live:/config/account.yaml\ndocker restart pure-live\n\n#设置服务器配置文件\ndocker cp PATH/TO/server.yaml pure-live:/config/server.yaml\ndocker restart pure-live\n\n#备份数据库\ndocker cp pure-live:/data/data.db .\n\n#备份配置文件\ndocker cp pure-live:/config .\n\n#复制log到宿主机\ndocker cp pure-live:/log .\n```\n\n### 二进制部署\n\n下载 [Release](https://github.com/iyear/pure-live-core/releases) 的最新打包文件\n\n解压后重命名 `config` 目录下的 `server.yaml.example` 为 `server.yaml` , `config/account.yaml.example` 为 `account.yaml` ,填写相关信息。\n\n```shell\nchmod +x ./pure-live\n./pure-live run\n```\n\n打开对应的本地地址 `localhost:\u003cport\u003e` ，即可看到前端界面，开始使用 `pure-live` 吧！\n\n`pure-live` 的初衷是本地或局域网的直播流推送，对于 `websocket` 推送没有做压缩或优化处理。\n\n将 `pure-live` 运行在局域网内的 `NAS` 或其他小型服务器上，就可以使整个局域网内享受到 `pure-live` 的支持。\n### 前端\n`Release` 都已经内置了默认的前端页面\n\n如果前端有小BUG修复，请前往前端仓库下载最新版本替换 `static` 目录下的所有文件\n\n前端自己快速看了一下 `Vue` 一把梭写出来的，仅仅是能用的水平，代码结构也很庞杂凌乱，期待更好的第三方前端页面出现。\n\n前端仓库: https://github.com/iyear/pure-live-frontend\n\n**其他前端页面：**\n\n- ......\n\n## ⚙️ 命令行(仅支持二进制文件)\n\n查看版本:\n```shell\n./pure-live -v\n```\n\n```\nv0.1.0.211224-beta\ngo1.17.3 windows/amd64\n```\n\n查看帮助:\n```shell\n./pure-live -h\n./pure-live run -h\n./pure-live get -h\n./pure-live export -h\n```\n\n### run\n#### 启动本地服务器\n\n`-s` : 服务器配置文件路径，默认为 `config/server.yaml`\n\n`-a` : 账号配置文件路径，默认为 `config/account.yaml`\n\n```shell\n./pure-live run\n./pure-live run -s myserver.yml\n./pure-live run -s my/myserver.yml -a my/myaccount.yml\n```\n\n### get\n#### 获取直播信息、直播流、弹幕流\n\n`-p` :平台名。涉及的平台参数在 [API文档](./docs/API.md#直播平台)  中查询\n\n`-r` : 房间号。长短号均可\n\n`--stream` : 下载对应的直播流(暂时只支持 `flv`)，不传入则不下载，传入文件名。此方式下载的 `flv` 文件较大，如需要更精细的控制请使用 `ffmpeg`\n\n`--danmaku` : 抓取对应的弹幕流，以 `xlsx` 格式保存，不传入则不抓取，传入文件名\n\n`--roll` : 抓取弹幕是否显示弹幕滚动信息\n\n```shell\n./pure-live get -p bilibili -r 6\n./pure-live get -p bilibili -r 6 --stream b.flv\n./pure-live get -p bilibili -r 6 --stream b.flv --danmaku dm.xlsx\n./pure-live get -p bilibili -r 6 --danmaku dm.xlsx --roll\n./pure-live get -p bilibili -r 6 --stream b.flv --danmaku dm.xlsx --roll\n```\n\n成功获得相关信息\n\n```\nRoom: 7734200\nUpper: 哔哩哔哩英雄联盟赛事\nTitle: 直播：全明星周末选人仪式\nLink: https://live.bilibili.com/7734200\nStream: https://d1--cn-gotcha03.bilivideo.com/live-bvc/842331/live_50329118_9516950.flv?cdn=cn-gotch......\n```\n\n### export\n#### 导出收藏及收藏夹信息\n\n`-d` : 数据库路径。默认 `data/data.db`\n\n`-p` : 导出路径。默认 `export.xlsx`\n\n```shell\n./pure-live export\n./pure-live export -d mydata/data.db\n./pure-live export -d mydata/data.db -p mydata.xlsx\n```\n\n## 🌲 生态\n\n目前 `pure-live` 的生态并不完善，最终的目标是做到开源社区驱动的维护模式。\n\n在发展到一定规模后， `pure-live` 将会以 `organization` 的形式维护 `core` 与不同平台的客户端。\n\n## 📝 文档\n\n如何写一个自己的前端? [API文档](./docs/API.md)\n\n如何添加新的平台支持? [Client文档](./docs/Client.md)\n\n移动平台 `gomobile` 支持? [TODO](./docs)\n\n## 📷 预览\n\n[WEB前端预览](img/frontend)\n\n## 🔩 贡献\n\n### ISSUE\n请使用 `issue` 发起任何问题，非重要事情请勿私聊。\n\n- 提出新的特性帮助 `pure-live` 成长。特性的支持效率取决于其重要程度。\n- 提出 `BUG` 解决使用中的问题。 `BUG` 的修复将优先考虑。\n- ......\n\n### PR\n\n在 `dev` 分支签出一个自己的分支，请勿向 `master` 发起 `PR`\n\n## 🔌 TODO\n\n### 基本直播功能(直播流+弹幕接收)\n\n- [x] 哔哩哔哩\n- [x] 虎牙\n- [x] 斗鱼\n- [x] 企鹅电竞\n- [x] 映客\n- [ ] 网易CC\n- [ ] Twitch (等待第三方库支持 `m3u8` 拉流)\n- [ ] 咪咕体育\n\n### 发送弹幕\n\n- [x] 哔哩哔哩\n- [ ] 虎牙\n- [ ] 斗鱼\n\n### get\n\n- [ ] 弹幕JSON保存\n- [ ] 弹幕ASS保存\n\n## 📈 趋势\n\n![stars](https://starchart.cc/iyear/pure-live-core.svg)\n\n## 🧑 贡献者\n\n\u003ca href=\"https://github.com/iyear/pure-live-core/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=iyear/pure-live-core\"  alt=\"contrib\"/\u003e\n\u003c/a\u003e\n\n## 🗒️ 参考\n\nhttps://github.com/wbt5/real-url\n\nhttps://github.com/flxxyz/douyudm\n\nhttps://github.com/BacooTang/huya-danmu\n\n## 🔖 LICENSE\n\nAGPL-3.0 License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyear%2Fpure-live-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyear%2Fpure-live-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyear%2Fpure-live-core/lists"}