{"id":13511714,"url":"https://github.com/jjeejj/geektime2pdf","last_synced_at":"2025-12-26T08:37:11.056Z","repository":{"id":37445074,"uuid":"179818990","full_name":"jjeejj/geektime2pdf","owner":"jjeejj","description":"极客时间专栏文章 转为 PDF 包含评论 音频","archived":false,"fork":false,"pushed_at":"2023-07-10T22:58:50.000Z","size":1595,"stargazers_count":448,"open_issues_count":11,"forks_count":203,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T21:32:33.615Z","etag":null,"topics":["column","geektime","pdf"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/jjeejj.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}},"created_at":"2019-04-06T10:25:11.000Z","updated_at":"2025-02-16T07:22:47.000Z","dependencies_parsed_at":"2023-10-21T11:57:22.474Z","dependency_job_id":null,"html_url":"https://github.com/jjeejj/geektime2pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jjeejj/geektime2pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeejj%2Fgeektime2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeejj%2Fgeektime2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeejj%2Fgeektime2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeejj%2Fgeektime2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjeejj","download_url":"https://codeload.github.com/jjeejj/geektime2pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeejj%2Fgeektime2pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28050356,"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-12-26T02:00:06.189Z","response_time":55,"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":["column","geektime","pdf"],"created_at":"2024-08-01T03:01:08.028Z","updated_at":"2025-12-26T08:37:11.019Z","avatar_url":"https://github.com/jjeejj.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# 极客时间专栏转换为PDF\n\n\u003e说明：该项目仅仅只能用户个人学习使用，不能在商业中使用，若极客时间官方要求该代码仓库删除，请联系我进行删除\n\n## 使用方法\n\n### 配置信息\n\n在配置文件[config.js](./config,js)中修改配置所需要的信息\n\n```js\n/**\n * 需要转换为 pdf 的配置信息 \n */\nmodule.exports = {\n    url: 'https://time.geekbang.org/serv/v1/article', // 该配置项不需要改动\n    commentUrl: 'https://time.geekbang.org/serv/v1/comments', // 该配置项不需要改动\n    columnBaseUrl: 'https://time.geekbang.org/column/article/', // 该配置项不需要改动\n    columnName: '玩转VScode', // 专栏名称\n    firstArticalId: 18053, //专栏第一篇文章的ID\n    articalIds: [201700,202772,204472,205784],  //指定下载的articalId, 优先级更高, 配置后firstArticalId配置将失效\n    isdownloadVideo: false, // 是否下载音频\n    isComment: false, // 是否导出评论\n    cookie: 'cookie'\n};\n```\n\n* 上面的配置项**前三项是不需要修改**的, 只需要修改后面的专栏信息\n\n* 会自动生成一个`geektime_{{columnName}}` 的文件夹来保存导出的所有`pdf`文件, `columnName` 为上面配置的\n\n* `firstArticalId` 这个参数最好配置专栏第一篇文章的 `ID` ，这个可以获取专栏的所有的文章,若不是第一篇文章的`ID` 则获取的是该文章以及之后的文章\n\n* `articalIds` 这个参数配置为需要获取的文章的所有的 `ID`\n\n* `cookie` 你在网页版登录后返回的`cookie`信息\n\n### 运行\n\n1. `git clone git@github.com:jjeejj/geektime2pdf.git` 在本地克隆下来\n2. 然后执行 `npm i` 安装依赖\n3. 运行主程序 `node columnArticleList.js` 等待一段时间,生成 `PDF` 完成\n\n\u003e 这里可以先设置 `firstArticalId` 参数，获取整个专栏的内容；若中间有错误，不用管它，等运行完毕后，再设置 `articalIds` 参数，参数的值为上面获取失败的文章 `ID`，再次运行下载\n\n![](./image/geektime_run.png)\n\n## 导出结果\n\n![](./image/geektime_VScode_filelist.png)\n\n![](./image/geektime_file_content.png)\n\n## 问题汇总\n\n* `puppeteer` 下载失败问题，参考 [stackoverflow](https://stackoverflow.com/questions/53997175/puppeteer-error-chromium-revision-is-not-downloaded)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjeejj%2Fgeektime2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjeejj%2Fgeektime2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjeejj%2Fgeektime2pdf/lists"}