{"id":21831161,"url":"https://github.com/yansheng836/gccl","last_synced_at":"2025-07-30T01:18:25.390Z","repository":{"id":47247072,"uuid":"211769633","full_name":"yansheng836/GCCL","owner":"yansheng836","description":":eyes:为CSDN博客分类生成目录导航列表。","archived":false,"fork":false,"pushed_at":"2025-02-11T02:53:18.000Z","size":858,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-21T07:42:04.302Z","etag":null,"topics":["csdn","csdnspider","java","jsoup"],"latest_commit_sha":null,"homepage":"","language":"Java","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/yansheng836.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2019-09-30T03:42:42.000Z","updated_at":"2025-02-11T02:53:22.000Z","dependencies_parsed_at":"2025-04-14T07:07:17.367Z","dependency_job_id":"9eb49d33-3238-4d49-8d3f-bf9ff27f2126","html_url":"https://github.com/yansheng836/GCCL","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/yansheng836/GCCL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yansheng836%2FGCCL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yansheng836%2FGCCL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yansheng836%2FGCCL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yansheng836%2FGCCL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yansheng836","download_url":"https://codeload.github.com/yansheng836/GCCL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yansheng836%2FGCCL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267791148,"owners_count":24144914,"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-07-29T02:00:12.549Z","response_time":2574,"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":["csdn","csdnspider","java","jsoup"],"created_at":"2024-11-27T19:08:47.317Z","updated_at":"2025-07-30T01:18:25.364Z","avatar_url":"https://github.com/yansheng836.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate CSDN Category List(GCCL)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/73584fbffb924a42827f373819f7f419)](https://www.codacy.com/gh/yansheng836/GCCL/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=yansheng836/GCCL\u0026amp;utm_campaign=Badge_Grade)\n[![Build Status](https://travis-ci.org/yansheng836/GCCL.svg?branch=master)](https://travis-ci.org/yansheng836/GCCL)\n[![codecov](https://codecov.io/gh/yansheng836/GCCL/branch/master/graph/badge.svg)](https://codecov.io/gh/yansheng836/GCCL)\n[![BCH compliance](https://bettercodehub.com/edge/badge/yansheng836/GCCL?branch=master)](https://bettercodehub.com/)\n[![GitHub LICENSE ](https://img.shields.io/github/license/yansheng836/GCCL)](https://github.com/yansheng836/GCCL/blob/master/LICENSE.txt)\n[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/yansheng836/GCCL?include_prereleases)](https://github.com/yansheng836/GCCL/releases)\n\n## 说明\n\n为CSDN博客分类生成目录导航列表。虽然CSDN的分类专栏支持二级分类，但是到目前为止(2019-9-30)它的层级关系并不密切，或者说是没有关系，所以这里就没有进行分层，仅仅是针对分类进行索引。\n\n样式参考了这篇博客：\u003chttps://blog.csdn.net/SnailMann/article/details/88392514\u003e，分类设置为三级目录（如果需要二级目录，可以自行添加），分类里面的博客设置成无序列表：\n\n```markdown\n### \u003cfont color =\"green\"\u003eJava基础\u003c/font\u003e\n\n- [命令行运行javac，报错: 编码 GBK 的不可映射字符 (0x9C)](https://blog.csdn.net/weixin_41287260/article/details/100177044)\n```\n\n## 思路\n\n1. 先爬取CSDN博主主页的（非空的）分类专栏的信息：分类专栏的名称、网址、数量。\n2. 到每个分类专栏爬取博客列表信息：博客的标题、网址。\n3. 将爬取到的博客信息按照特定的格式输出到文件中。\n\n### 注：\n\n- 页面元素分析可见：[页面元素分析](\u003chttps://github.com/yansheng836/GCCL/tree/master/页面元素分析\u003e)。\n- 因为我将分类信息和博客信息都存放在`ArrayList`中，所以最后生成的目录是有序的，都是按照分类专栏和每个专栏的博客的顺序进行排列的。\n  - 分类专栏的排列顺序：可到[分类专栏管理处](https://mp.csdn.net/classify_and_column/list)调整分类专栏的排列顺序。\n  - 分类专栏中的博客顺序：不得不吐槽的是：这个顺序默认是随机的，虽然很多人都想CSDN工作人员反映这个问题，但是不知道为啥就是不改了。修改：进到每个分类专栏，点击右上角的`管理博客`--\u003e`批量操作`--\u003e`排序`--\u003e顺序建议使用`按创建时间`的`降序`。\n\n## 效果\n\n请看生成的文件 [博客目录-最新版.md](./博客目录-最新版.md)，或者参考我的CSDN博客目录：[【目录】博客目录 | 先点这里](\u003chttps://blog.csdn.net/weixin_41287260/article/details/101735143\u003e)。\n\n## 测试\n\n对多种情况进行了测试，得出了对应的程序运行时间，详见：[程序测试](\u003chttps://github.com/yansheng836/GCCL/blob/master/程序测试\u003e)。\n\n## 使用\n\n### 简单使用\n\n下载最新的发布包：[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/yansheng836/GCCL?include_prereleases)](https://github.com/yansheng836/GCCL/releases)\n\n提供脚本，详见：[运行GCCL工具的脚本](\u003chttps://github.com/yansheng836/GCCL/tree/master/运行GCCL工具的脚本\u003e)，可直接运行该工具。\n\n然后输入用户名，稍等片刻，即可在当前目录生成`CSDN博客目录.md`文件，复制到CSDN的markdown编辑器即可，当然你也可以添加一些说明。\n\n[我的博客](https://blog.csdn.net/weixin_41287260):(2019-10-14)有97篇原创，含转发共153篇博客，26个非空分类专栏，分类专栏下博客共251篇。相当于原创的当于3倍（因为每篇博客可以选三个分类专栏）。用时在20s~50s之间（与网络状况有关）。\n\n\u003cdetails\u003e\n\u003csummary\u003e\n示范如下(点击左边三角形展开)：\n\u003c/summary\u003e\n\n```shell\n-------------------------------------------------------------------------------\n-----------------------欢迎使用CSDN博客目录生成工具(GCCL)----------------------\n                          _____   _____  _____  _\n                         / ____| / ____|/ ____|| |\n                        | |  __ | |    | |     | |\n                        | | |_ || |    | |     | |\n                        | |__| || |____| |____ | |____\n                         \\_____| \\_____|\\_____||______|\n.\n该工具可为您生成“CSDN博客导航目录”,使用前请阅读README,然后按照提示进行操作。\n如果在使用过程中遇到问题，可到 https://github.com/yansheng836/GCCL/issues 提问。\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\n！！！！！！！！！！！！！！！！！声明：！！！！！！！！！！！！！！！！！！！\n该工具仅供学习交流使用，请勿用于商业用途；该工具是完全免费的，不进行任何保证，\n版权归 sheng.yan836@gmail.com 所有。\n-------------------------------------------------------------------------------\n.\n__          __  _                          _ \n\\ \\        / / | |                        | |\n \\ \\  /\\  / /__| | ___ ___  _ __ ___   ___| |\n  \\ \\/  \\/ / _ \\ |/ __/ _ \\| '_ ` _ \\ / _ \\ |\n   \\  /\\  /  __/ | (_| (_) | | | | | |  __/_|\n    \\/  \\/ \\___|_|\\___\\___/|_| |_| |_|\\___(_)\n                                             \n请输入用户名：weixin_41287260\n\n\nweixin_41287260,即将为您生成CSDN博客目录。\n\n1.正在获取分类专栏的信息，请稍候……\n----所有分类专栏一共有:251篇博客(包含重复的)。\n----获取分类专栏信息成功，共有26个非空的分类专栏。\n2.正在获取每个分类专栏内的博客信息……\n----获取分类专栏内的博客信息成功！\n3.正在生成该用户的‘博客导航分类目录’文件……\n----生成‘博客导航分类目录’文件成功！！\n文件路径为：CSDN博客目录-2019-10-14.21-54-19.md\n\n**感谢您使用该工具,此次用时:41.143秒,期待下一次的重逢!**\n  _____                 _ _                _ \n / ____|               | | |              | |\n| |  __  ___   ___   __| | |__  _   _  ___| |\n| | |_ |/ _ \\ / _ \\ / _` | '_ \\| | | |/ _ \\ |\n| |__| | (_) | (_) | (_| | |_) | |_| |  __/_|\n \\_____|\\___/ \\___/ \\__,_|_.__/ \\__, |\\___(_)\n                                 __/ |       \n                                |___/        \n```\n\n效果图：![效果图](https://s2.ax1x.com/2019/10/15/K9cLex.jpg)\n\n\u003c/details\u003e\n\n### 开发\n\n1. git clone \u003chttps://github.com/yansheng836/GCCL.git\u003e\n2. 以Maven形式导入IDE。\n3. 运行`/GCCL/src/main/java/xyz/yansheng/main`下面的`App`主程序。\n4. 或者按需开发自己的程序。\n\n## Limitation\n\n- 目前只能爬取没有自定义博客域名的博客，博客主页网址形式为：https: //blog.csdn.net/ + username，如我的CSDN用户名为`weixin_41287260`，我的博客主页网址为：\u003chttps://blog.csdn.net/weixin_41287260\u003e。\n- 如果选择的博客主题在侧边栏没有博客分类专栏，那么该工具无效（如这位博主的：\u003chttps://blog.csdn.net/lingshengxueyuan\u003e）。\n- 如果某个分类专栏没有设置在前台显示，则不能爬取该分类专栏的信息。（注：如果没有到 [分类专栏管理处](\u003chttps://mp.csdn.net/classify_and_column/list\u003e) 进行设置，新建后默认为显示/可见。）\n- 前面已经提到了分类专栏可能有分级的情况（一级和二级），但是因为关系不紧密，该工具没有做这方面的处理。进行过测试，发现应该是可以爬取二级分类的。\n\n## CHANGELOG\n\n详见：[CHANGELOG.md](https://github.com/yansheng836/GCCL/blob/master/CHANGELOG.md)。\n\n## License\n\nThis work is licensed under a [MIT](https://github.com/yansheng836/GCCL/blob/master/LICENSE.txt).\n\n## Declaration\n\n- 本项目仅用于学习交流使用，**禁止**进行商业目的的开发、发布、运营等。数据所有权归 \u003chttp://www.csdn.net/\u003e 所有。\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=yansheng836/GCCL\u0026type=Timeline)](https://star-history.com/#yansheng836/GCCL\u0026Timeline)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyansheng836%2Fgccl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyansheng836%2Fgccl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyansheng836%2Fgccl/lists"}