{"id":23600124,"url":"https://github.com/xiaoxiunique/x-kit","last_synced_at":"2025-05-15T14:05:45.873Z","repository":{"id":268496631,"uuid":"903985246","full_name":"xiaoxiunique/x-kit","owner":"xiaoxiunique","description":"一个用于抓取和分析 X (Twitter) 用户数据和推文的工具。","archived":false,"fork":false,"pushed_at":"2025-05-13T15:01:04.000Z","size":9899,"stargazers_count":675,"open_issues_count":4,"forks_count":96,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-13T15:25:26.563Z","etag":null,"topics":["crawler","kols","twitter","x"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaoxiunique.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-16T03:05:01.000Z","updated_at":"2025-05-13T15:01:08.000Z","dependencies_parsed_at":"2024-12-17T06:18:01.624Z","dependency_job_id":"aa120da8-7c81-4411-8e4e-5fdd9f52d583","html_url":"https://github.com/xiaoxiunique/x-kit","commit_stats":null,"previous_names":["xiaoxiunique/x-kit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiunique%2Fx-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiunique%2Fx-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiunique%2Fx-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiunique%2Fx-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoxiunique","download_url":"https://codeload.github.com/xiaoxiunique/x-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355334,"owners_count":22057354,"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":["crawler","kols","twitter","x"],"created_at":"2024-12-27T11:48:12.789Z","updated_at":"2025-05-15T14:05:40.864Z","avatar_url":"https://github.com/xiaoxiunique.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# x-kit\n\n一个用于抓取和分析 X (Twitter) 用户数据和推文的工具。\n\n![x-kit](./images/action-stats.png)\n## 功能特点\n\n- 自动抓取指定用户的基本信息和推文\n- 定时更新用户时间线数据\n- 支持数据本地化存储\n- GitHub Actions 自动化部署\n\n## 更新日志\n\n- 2024-12-24 添加每日发布推文功能 `post-twitter-daily.yml` `post-tweet.ts`\n- 2025-01-02 添加获取用户推文功能 `fetch-user-tweets.ts`\n\n## 安装\n\n```bash\nbun install\n```\n\n## 使用方法\n\n### 1. 配置环境变量\n\n在项目根目录创建 `.env` 文件,添加以下配置:\n\n```bash\nAUTH_TOKEN=你的X认证Token\nGET_ID_X_TOKEN=用于获取用户ID的Token\n```\n\n### 2. 添加需要追踪的用户\n\n在 `dev-accounts.json` 中添加用户信息:\n\n```json\n{\n  \"username\": \"用户名\",\n  \"twitter_url\": \"用户主页链接\", \n  \"description\": \"用户描述\",\n  \"tags\": [\"标签1\", \"标签2\"]\n}\n```\n\n### 3. 运行脚本\n\n```bash\n# 获取用户信息\nbun run scripts/index.ts\n\n# 获取最新推文\nbun run scripts/fetch-tweets.ts\n\n# 批量关注用户\nbun run scripts/batch-follow.ts\n```\n\n## 自动化部署\n\n项目使用 GitHub Actions 实现自动化:\n\n- `get-home-latest-timeline.yml`: 每30分钟获取一次最新推文\n- `daily-get-tweet-id.yml`: 每天获取一次用户信息\n\n## 数据存储\n\n- 用户信息保存在 `accounts/` 目录\n- 推文数据保存在 `tweets/` 目录,按日期命名\n\n## 技术栈\n\n- Bun\n- TypeScript \n- Twitter API\n- GitHub Actions\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoxiunique%2Fx-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoxiunique%2Fx-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoxiunique%2Fx-kit/lists"}