{"id":14989013,"url":"https://github.com/chilfish/weibo-archiver","last_synced_at":"2025-05-16T09:04:06.929Z","repository":{"id":190556111,"uuid":"681615155","full_name":"Chilfish/Weibo-archiver","owner":"Chilfish","description":"将微博导出备份的油猴脚本，为号被完全夹没前未雨绸缪 😭","archived":false,"fork":false,"pushed_at":"2025-05-10T17:10:02.000Z","size":10090,"stargazers_count":347,"open_issues_count":6,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-16T09:04:05.003Z","etag":null,"topics":["archiver","backup","tampermonkey","violentmonkey","vue","weibo"],"latest_commit_sha":null,"homepage":"https://weibo.chilfish.top","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chilfish.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-22T11:49:02.000Z","updated_at":"2025-05-16T02:17:39.000Z","dependencies_parsed_at":"2023-11-22T11:12:03.690Z","dependency_job_id":"b3cd188d-0963-4dd5-8942-cd520faa29ff","html_url":"https://github.com/Chilfish/Weibo-archiver","commit_stats":{"total_commits":297,"total_committers":2,"mean_commits":148.5,"dds":"0.0033670033670033517","last_synced_commit":"1f25963313c5b087fdfdbcb1999d15da63f3861b"},"previous_names":["chilfish/weibo-archiver"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chilfish%2FWeibo-archiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chilfish%2FWeibo-archiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chilfish%2FWeibo-archiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chilfish%2FWeibo-archiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chilfish","download_url":"https://codeload.github.com/Chilfish/Weibo-archiver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501557,"owners_count":22081528,"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":["archiver","backup","tampermonkey","violentmonkey","vue","weibo"],"created_at":"2024-09-24T14:17:34.489Z","updated_at":"2025-05-16T09:04:06.909Z","avatar_url":"https://github.com/Chilfish.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg\n    alt=\"logo\"\n    width=\"100\"\n    src=\"https://p.chilfish.top/weibo/icon.webp\"\n  /\u003e\n\n  \u003cdiv\u003e\n    \u003cimg src=\"https://wakatime.com/badge/user/0842a71f-c026-4b09-8aa0-f8398b4c3423/project/3416f224-f0dc-4b08-805c-af30dbd396b2.svg\" alt=\"wakatime\"\u003e\n    \u003cimg alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/chilfish/weibo-archiver\"\u003e\n    \u003cimg alt=\"GitHub Downloads\" src=\"https://img.shields.io/github/downloads/chilfish/weibo-archiver/total\"\u003e\n    \u003cimg alt=\"beta build\" src=\"https://github.com/Chilfish/Weibo-archiver/actions/workflows/beta-build.yml/badge.svg\"\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n## Weibo-archiver\n\n将你的新浪微博回忆归档，为号被完全夹没前未雨绸缪 😭\n\n![封面](https://p.chilfish.top/weibo/cover.webp)\n![功能展示](https://p.chilfish.top/weibo/feature.webp)\n![设置页](https://p.chilfish.top/weibo/settings.webp)\n\n### 使用方式\n\n首先需要浏览器装有 [Tampermonkey](https://tampermonkey.net/) 插件。\n\n#### 1. 备份微博数据\n\n安装至油猴脚本：[weibo-archiver.user.js][releases]（如果下载缓慢可用境内加速的 [镜像地址]）。在登录后的[微博网页版]刷新后将启动脚本，点击开始后将开始获取数据。支持断点续传，可恢复到上次的进度。\n\n如果通过名字搜索不到想要的用户，可以尝试通过进入用户主页，获取在浏览器URL地址栏中的数字id（如`https://weibo.com/u/1234567890`）来搜索\n\n#### 2. 下载微博中的图片（不是必须的）\n\n为了防止微博图片链接失效，建议及时下载图片到本地\n\n1. 在 [releases] 中下载对应平台的可执行文件\n2. 解压后按照 [本地服务器使用说明](server/README.md) 操作\n3. 下载完成后可以在本地离线浏览所有图片和微博数据\n\n该本地服务器还提供离线启动网页来查看微博数据\n\n#### 3. 命令行模式\n\n同时也支持 ClI 模式，可以在 [Node.js 官网] 下载安装 Node.js 后，使用 `npx weibo-archiver` 来启动，具体的使用方法可见 `npx weibo-archiver --help` 和 [README](apps/cli/README.md)\n\n更多详细操作可以查看 [使用教程]\n\n### 注意事项 | 声明\n\n该工具仅能获取公开可见的微博，对于那些仅半年可见之外的、仅粉丝（自己）可见的等，若不是自己的微博，将无法获取。\n\n- **完全免费**，使用 **Apache 2.0** 协议开源，不会有任何收费行为。但如果要二次创作或者引用，需要注明出处和署名，不得修改协议或是去除版权声明，详见 [LICENSE](LICENSE)😇\n\n- 为了减轻微博服务器的压力，或是避免一些不必要的麻烦，请尽量在比较人少的时间段使用\n\n- 若微博账号被封，但访问自己的主页微博，也能获取备份。也就是 **只要能看得见，就能存档**\n\n- 关于在线预览页面。上传的微博数据完全保存在你的浏览器本地，你和别人都 **无法通过链接来直接查看这些微博数据**。但如果你想分享给其他人查看，可以将 `weibo-data.json` 发送给他们，并按提示导入即可，同时再设置里将图片链接设为远程 CDN 链接，或是填上你的图床地址\n\n- 评论区：获取时，将默认同时获取前 6 条热评，总数不超过 20 条。这是为了避免频繁调用接口，而可能会导致的不明问题。暂时也不支持楼中楼\n\n- 媒体文件：只能获取图片，将以图片链接文件的形式导出，需要同时使用下载图片工具下载好之后，才能在预览页面中可见。这是为了能够离线预览，同时也是为了防止某天图片突然被夹没了😅。并且由于视频文件可能会过大、过长，将采用外链的形式来呈现。\n\n- 不过可以将下载后的图片上传到你自己的图床服务器里，注意不要改变文件目录，再在预览页面的设置中填写你的图床链接即可\n\n- 对于备份登录的用户是可以导出全部数据，如果是备份别人的微博，由于限制，一次性最多只能导出约900条微博，建议按日期分批导出。\n\n### 对开发者\n\n项目采用 monorepo 的结构，使用 pnpm 管理，因此需要先安装 pnpm：`npm i -g pnpm`\n\n在 packages 目录下：\n\n- [/core](packages/core/) 包含了工具函数、数据处理的核心\n- [/ui](packages/ui/) 包含 UI 部分的组件代码\n- [/shared](packages/shared/) 不含 vue 的共用 lib 库\n\n在 apps 目录下，为最终的应用\n\n- [/web](apps/web/) 是用于最终查看微博数据的网页，目前托管在 [vercel] 上\n- [/monkey](apps/monkey/) 用于打包成油猴脚本\n- [/cli](apps/cli) Nodejs 命令行版本\n\n只需要在根目录中 `pnpm i` 即为所有子项目安转依赖，`pnpm dev:monkey` 对应的是在 /monkey 中的 `pnpm dev`\n\n至于运行打包后的结果，由于是静态的资源，可以直接用 nginx 服务，或是运行 `pnpx serve .\\.output\\public\\` 来查看\n\n\u003e 直接部署到 vercel 前，需要先去 vercel 的项目设置中将 Root Directory 设为 `apps/web`，才能正确识别项目并构建\n\n在 server 目录下是使用 go 语言编写的一个本地服务器，用于下载图片和浏览微博数据，具体使用方法可见 [本地服务器使用说明](server/README.md)\n\n### 鸣谢\n\n- 感谢 [speechless] 提供的基本思路\n- [vite-plugin-monkey] 提供了打包成油猴脚本的工具\n- [naive-ui] 提供的漂亮 UI 组件库\n- [vercel] 提供的在线云平台部署😚\n- Github Copilot 😇\n\n### 赞助\n\n如果你觉得这个项目对你有帮助，可以考虑赞助v我😇这将给我更多的动力来维护这个项目：[赞助地址]\n\n[releases]: https://raw.githubusercontent.com/Chilfish/Weibo-archiver/monkey/weibo-archiver.user.js\n[scripts.zip]: https://github.com/Chilfish/Weibo-archiver/raw/monkey/scripts.zip\n[speechless]: https://github.com/meterscao/Speechless\n[naive-ui]: https://www.naiveui.com/zh-CN/os-theme\n[#1]: https://github.com/Chilfish/Weibo-archiver/issues/1\n[#5]: https://github.com/Chilfish/Weibo-archiver/issues/5\n[Node.js 官网]: https://nodejs.org/en/download\n[vite-plugin-monkey]: https://github.com/lisonge/vite-plugin-monkey\n[镜像地址]: https://p.chilfish.top/weibo-archiver.user.js\n[项目的 Todo]: https://github.com/Chilfish/Weibo-archiver/issues/7\n[赞助地址]: https://chilfish.top/sponsors\n[vercel]: https://vercel.com\n[使用教程]: https://docs.qq.com/doc/DTWttbXlMUGxZZnZq\n[actions]: https://github.com/Chilfish/Weibo-archiver/actions/workflows/beta-build.yml?query=branch:main+event:push+is:success\n[微博网页版]: https://weibo.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchilfish%2Fweibo-archiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchilfish%2Fweibo-archiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchilfish%2Fweibo-archiver/lists"}