{"id":16976860,"url":"https://github.com/lrunlin/puppeteer-juejin","last_synced_at":"2025-04-12T01:34:15.457Z","repository":{"id":63248780,"uuid":"558322829","full_name":"Lrunlin/puppeteer-juejin","owner":"Lrunlin","description":"puppeteer爬虫，爬取掘金文章","archived":false,"fork":false,"pushed_at":"2022-12-20T13:54:37.000Z","size":105,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T21:15:13.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Lrunlin.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}},"created_at":"2022-10-27T10:15:56.000Z","updated_at":"2024-07-01T06:45:10.000Z","dependencies_parsed_at":"2023-01-30T00:46:10.321Z","dependency_job_id":null,"html_url":"https://github.com/Lrunlin/puppeteer-juejin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fpuppeteer-juejin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fpuppeteer-juejin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fpuppeteer-juejin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fpuppeteer-juejin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lrunlin","download_url":"https://codeload.github.com/Lrunlin/puppeteer-juejin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504474,"owners_count":21115163,"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":[],"created_at":"2024-10-14T01:27:26.717Z","updated_at":"2025-04-12T01:34:15.433Z","avatar_url":"https://github.com/Lrunlin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 说明\n\n**网站对掘金社区进行爬取，并且将文章数据以及图片文件夹的形式进行保存**\n\n![数据保存](https://img.blogweb.cn/article/fa6343349fa5464c8ea9d09475c7786f.webp)\n\n如果您使用了[博客项目](https://github.com/Lrunlin/blog)可以使用[puppeteer-juejin-blog](https://github.com/Lrunlin/puppeteer-juejin-blog),该程序可以自动将图片和文章数据保存至博客网站的服务器\n\nNode.js 爬虫,程序为掘金社区的文章爬取,使用 Node.js 程序编写需要依靠 puppeteer 和 cheerio,使用 puppeteer 通过浏览器模拟用户行为可以防止访问速度过快而遭到限流或者验证。\n\n## 本程序如何通过反扒取机制(必看!)？\n\n_建议使用本机浏览器（默认方式）使用headless有被反爬拦截的风险，本程序并未对headless做处理_\n\n1. [参考文章](https://blogweb.cn/article/6064301311)用户使用前需要参考本篇文章设置 Chrome 启动端口后，系统使用本地 Chrome 进行自动化爬取(最好已经登录了掘金账号，降低被限流的可能)\n2. 在发起请求时设置指定的请求头，同时使用 sleep 函数对程序进行限速\n3. 模拟滚动\n\n## 启动\n\n1. yarn\n2. 填写 config.ts 中的配置数据\n3. yarn start\n\n## 相关文章\n[Puppeteer爬取掘金文章](https://blogweb.cn/article/1197996635410)  \n\n# [BLOG](https://blogweb.cn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrunlin%2Fpuppeteer-juejin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flrunlin%2Fpuppeteer-juejin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrunlin%2Fpuppeteer-juejin/lists"}