{"id":18035454,"url":"https://github.com/viper373/gsc-kit","last_synced_at":"2025-04-04T23:24:03.400Z","repository":{"id":258146412,"uuid":"873963314","full_name":"Viper373/GSC-Kit","owner":"Viper373","description":"🚀 GSC-Kit旨在自动化从 Google Search Console (GSC) 提取数据，帮助高效地收集和整理网站的性能指标。","archived":false,"fork":false,"pushed_at":"2025-01-19T02:23:37.000Z","size":1611,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T07:45:09.677Z","etag":null,"topics":["chrome-extension","google-console","gsc-script","javascript","python","python-crawler"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Viper373.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}},"created_at":"2024-10-17T02:46:46.000Z","updated_at":"2025-01-19T02:23:39.000Z","dependencies_parsed_at":"2025-01-19T03:20:29.328Z","dependency_job_id":"742a34e4-e5ad-49c9-9fee-4ffb7dee8c6e","html_url":"https://github.com/Viper373/GSC-Kit","commit_stats":null,"previous_names":["viper373/gsc-kit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FGSC-Kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FGSC-Kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FGSC-Kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FGSC-Kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Viper373","download_url":"https://codeload.github.com/Viper373/GSC-Kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247263410,"owners_count":20910400,"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":["chrome-extension","google-console","gsc-script","javascript","python","python-crawler"],"created_at":"2024-10-30T12:07:37.075Z","updated_at":"2025-04-04T23:24:03.386Z","avatar_url":"https://github.com/Viper373.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📈 GSC-Kit\n\n欢迎使用 **GSC-Kit** 项目！🚀 这个工具旨在自动化从 Google Search Console (GSC) 提取数据，帮助高效地收集和整理网站的性能指标。\n\n## 📋 目录\n\n- [📦 项目结构](#-项目结构)\n- [🔧 安装指南](#-安装指南)\n    - [1. 克隆仓库](#1-克隆仓库)\n    - [2. 创建虚拟环境](#2-创建虚拟环境)\n    - [3. 安装依赖](#3-安装依赖)\n- [🛠 使用方法](#-使用方法)\n    - [1. 配置 Cookies](#1-配置-cookies)\n    - [2. 运行主程序](#2-运行主程序)\n- [🧰 工具与库](#-工具与库)\n- [📦 插件目录](#-插件目录)\n- [📝 贡献指南](#-贡献指南)\n- [📄 许可证](#-许可证)\n- [🐞 已知问题](#-已知问题)\n- [📬 联系方式](#-联系方式)\n\n## 📦 项目结构\n\n以下是项目的目录结构概览：\n\n```plaintext\nGSC-Kit/ \n├── run_task/ \n│ ├── run_task_get.py \n│ ├── run_task_indexing.py \n│ └── run_task_performance.py \n├── tool_utils/ \n│ ├── decorator_utils.py \n│ ├── string_utils.py \n│ └── file_utils.py \n├── excel/ \n│ └── (Excel 文件将保存在这里) \n├── logs/ │ └── (日志文件将保存在这里) \n├── GSC-Kit1.0/ \n│ └── (Chrome 插件文件) \n├── requirements.txt \n├── gsc_main.py \n└── README.md\n```\n\n- **`run_task/`**: 包含执行各种抓取任务的脚本。\n- **`tool_utils/`**: 工具模块，用于日志记录、字符串处理和文件管理。\n- **`excel/`**: 存储抓取的 Excel 文件，按日期和域名组织。\n- **`logs/`**: 存储日志文件。\n- **`GSC-Kit1.0/`**: Chrome 插件目录，包含 GSC-Kit1.0 插件文件。\n- **`requirements.txt`**: 列出所有 Python 依赖项。\n- **`gsc_main.py`**: 主程序入口，用于同时运行索引和性能抓取任务。\n- **`README.md`**: 本文档文件。\n\n## 🔧 安装指南\n\n按照以下步骤在本地机器上设置项目。\n\n### 1. 克隆仓库\n\n```bash\ngit clone https://github.com/yourusername/GSC-Kit.git\ncd GSC-Kit\n```\n\n### 2. 创建虚拟环境\n```python\npython3.12 -m venv venv\n```\n\n激活虚拟环境：\n  \n- Windows:\n\n  ```bash\n  venv\\Scripts\\activate\n  ```\n- macOS丨Linux:\n\n  ```bash\n  source venv/bin/activate\n  ```\n\n### 3. 安装依赖\n确保已安装 Python 3.12.1。然后，安装所需的包：\n    \n```bash\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n## 🛠 使用方法\n### 1. 配置 Cookies\n确保拥有已登录的 Google Search Console 会话的必要 Cookies。这些 Cookies 是进行身份验证所需的。\n\n在运行`gsc_main.py`之前，需要将这些 Cookies 添加到`gsc_main.py`文件中的`cookies`变量中。\n```python\n# gsc_main.py\n\nfrom run_task.run_task_indexing import RunTaskIndexing\nfrom run_task.run_task_performance import RunTaskPerformance\n\ncookies = {\n    # 你的cookies\n}\n\nrun_task_indexing = RunTaskIndexing(cookies)\nrun_task_performance = RunTaskPerformance(cookies)\n\nif __name__ == '__main__':\n    run_task_performance.run_performance()\n    run_task_indexing.run_indexing()\n```\n\n### 2. 运行主程序\n```bash\npython gsc_main.py\n```\n\n## 🧰 工具与库\n\n- **`requests`**: 用于发送 HTTP 请求。\n- **`rich`**: 用于增强日志记录和美化输出。\n- **`logging`**: 用于记录事件和错误。\n- **`re`**: 用于字符串模式匹配和提取。\n- **`datetime`**: 用于处理日期和时间。\n- **`os`**: 用于文件和目录操作。\n\n## 📦 插件目录\n\n项目还包含一个 Chrome 插件 GSC-Kit1.0，用于平替 GSC 的功能。插件目录结构如下：\n```plaintext\nGSC-Kit1.0/\n└── images/\n    ├── icon.png\n    ├── icon16.png\n    ├── icon32.png\n    ├── icon48.png\n    └── icon128.png\n├── popup\n│   ├── popup.html\n│   ├── popup.css\n│   ├── popup.js\n├── scripts\n│   ├── background.js\n│   ├── content.js\n│   ├── function.js\n│   ├── xlsx.mjs\n├── static\n│   ├── data.css\n│   ├── data.html\n│   ├── data.js\n├── manifest.json\n```\n### 已知问题 🐞\nGSC-Kit1.0 插件小BUG: 当前版本的插件在跳转新链接后无法正确提取数据（提取的是旧页面的数据，除非在新页面刷新一次）。欢迎提交 Issue 或 Pull Request 贡献。\n\n## 📝 贡献指南\n欢迎任何形式的贡献！🎉 请按照以下步骤进行：\n\n1. Fork 本仓库。\n2. 创建新分支: `git checkout -b feature/YourFeature`。\n3. 进行更改并提交: `git commit -m '添加新功能'`。\n4. 推送到分支: `git push origin feature/YourFeature`。\n5. 提交 Pull Request。\n\n## 📄 许可证\n本项目采用 MIT 许可证。有关更多信息，请参阅 [LICENSE](LICENSE) 文件。\n\n## 📬 联系方式\n如有任何问题或建议，欢迎联系作者：\n\n- Email: [2020311228@bipt.edu.cn](mailto:2020311228@bipt.edu.cn)\n- GitHub: [Viper373](https://github.com/Viper373)\n\n感谢使用 GSC-Kit！若有任何问题或需要支持，请随时打开一个 issue 或联系维护者。使用愉快！🕷️✨ \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviper373%2Fgsc-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviper373%2Fgsc-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviper373%2Fgsc-kit/lists"}