{"id":19859590,"url":"https://github.com/youngjuning/homebrew-juejin-spider","last_synced_at":"2025-08-07T16:04:29.345Z","repository":{"id":57538518,"uuid":"287311569","full_name":"youngjuning/homebrew-juejin-spider","owner":"youngjuning","description":"爬取掘金专栏并转为Markdown保存到本地","archived":false,"fork":false,"pushed_at":"2020-08-18T15:07:10.000Z","size":38499,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T02:39:08.581Z","etag":null,"topics":["colly","golang","spider"],"latest_commit_sha":null,"homepage":"","language":"Go","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/youngjuning.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}},"created_at":"2020-08-13T15:09:39.000Z","updated_at":"2024-06-22T10:22:52.000Z","dependencies_parsed_at":"2022-09-19T07:30:27.521Z","dependency_job_id":null,"html_url":"https://github.com/youngjuning/homebrew-juejin-spider","commit_stats":null,"previous_names":["youngjuning/juejin-spider"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/youngjuning/homebrew-juejin-spider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngjuning%2Fhomebrew-juejin-spider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngjuning%2Fhomebrew-juejin-spider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngjuning%2Fhomebrew-juejin-spider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngjuning%2Fhomebrew-juejin-spider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youngjuning","download_url":"https://codeload.github.com/youngjuning/homebrew-juejin-spider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngjuning%2Fhomebrew-juejin-spider/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269284619,"owners_count":24391127,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["colly","golang","spider"],"created_at":"2024-11-12T14:29:18.735Z","updated_at":"2025-08-07T16:04:29.297Z","avatar_url":"https://github.com/youngjuning.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 掘金专栏小爬虫\n\n\u003e 声明：掘金对于文章侵权是严厉打击的，不管你在哪搞事情，都能搞掉你。\n\n这个脚本很简单，爬取掘金专栏详情页并把内容转成Markdown之后保存在本地。这是在写 [极速入门Go并爬取掘金专栏 | 🏆 技术专题第二期](https://juejin.im/post/6860522117423857678) 时写的小玩意。\n\n## 安装\n\n### 下载 Tab\n\n```sh\n$ brew tap youngjuning/juejin-spider https://github.com/youngjuning/homebrew-juejin-spider.git\n```\n\n### 下载脚本\n\n```sh\n$ brew install youngjuning/juejin-spider/juejin\n```\n\n## 升级\n\n```sh\n$ brew upgrade youngjuning/juejin-spider/juejin\n```\n\n## 使用\n\n```sh\n$ juejin -post 6860522117423857678 -root ~/Desktop\n```\n\n```sh\n$ juejin -h\nUsage of juejin:\n  -post string\n    \t文章编号 (default \"6859538537830858759\")\n  -root string\n    \t文件保存的根目录 (default \"/Users/yangjunning/juejin\")\n```\n\n## 打包并使用Homebrew发布脚本\n\n\u003e 感谢 [使用HomeBrew发布脚本](https://www.jianshu.com/p/e88831aac62a) 这篇文章。\n\n### 1、打包成可执行文件\n\n```sh\n$ go build juejin.go\n```\n\n### 2、将可执行文件打包成 tar.gz 的格式\n\n```shell\n$ tar zcvf juejin_0.0.1.tar.gz juejin\n```\n\n![](https://i.loli.net/2020/08/14/u4ZWeM1UlIqALzH.png)\n\n上传到git，供配方软连接到这个脚本文件。\n\n### 3、使用 `brew create \u003cgit-url\u003e --tab user/repo` 创建药方\n\n```sh\n$ brew create \\\n    https://github.com/youngjuning/homebrew-juejin-spider/raw/master/juejin_0.0.1.tar.gz \\\n    --tap youngjuning/homebrew-juejin-spider\n```\n\n我们需要对安装方式做一下调整:\n\n```ruby\ndef install\n    bin.install \"juejin\"\nend\n```\n\n做完这些操作后，保存，提交到git上。\n\n### 4、安装脚本\n\n```shell\n$ brew install youngjuning/juejin-spider/juejin\n```\n\n执行 `juejin -h` 检查是否成功：\n\n```shell\n$ juejin -h\nUsage of juejin:\n  -post string\n    \t文章编号 (default \"6859538537830858759\")\n  -root string\n    \t文件保存的根目录 (default \"/Users/yangjunning/juejin\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoungjuning%2Fhomebrew-juejin-spider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoungjuning%2Fhomebrew-juejin-spider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoungjuning%2Fhomebrew-juejin-spider/lists"}