{"id":22775199,"url":"https://github.com/viper373/baidutieba","last_synced_at":"2025-03-30T13:14:47.479Z","repository":{"id":232407090,"uuid":"784257613","full_name":"Viper373/BaiduTieba","owner":"Viper373","description":"爬取百度贴吧（指定吧名、起始页数/重点页数、日志输出）","archived":false,"fork":false,"pushed_at":"2024-06-02T13:03:10.000Z","size":9882,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T14:48:43.887Z","etag":null,"topics":["baidutieba-crawler","bert","data-analysis","deep-learning","python","spider"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Viper373.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-09T13:52:12.000Z","updated_at":"2024-11-16T12:14:04.000Z","dependencies_parsed_at":"2024-04-12T13:32:27.663Z","dependency_job_id":"853f715f-6f53-48db-af71-8d5a2ddeac7c","html_url":"https://github.com/Viper373/BaiduTieba","commit_stats":null,"previous_names":["viper373/baidutieba"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FBaiduTieba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FBaiduTieba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FBaiduTieba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viper373%2FBaiduTieba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Viper373","download_url":"https://codeload.github.com/Viper373/BaiduTieba/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246320199,"owners_count":20758410,"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":["baidutieba-crawler","bert","data-analysis","deep-learning","python","spider"],"created_at":"2024-12-11T18:26:20.798Z","updated_at":"2025-03-30T13:14:47.457Z","avatar_url":"https://github.com/Viper373.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 百度贴吧爬虫\n\n    这是一个基于 Python 的百度贴吧爬虫，用于获取指定关键词的贴吧帖子信息并存储到 CSV 文件中。\n\n## 项目结构\n\n- 🚀 `tieba.py`：主要的爬虫脚本，用于爬取贴吧帖子信息。\n- 🎂 `config.py`：配置文件，用于设置搜索关键词、爬取起始页数和终点页数。\n- 🔗 `requirements.txt`：依赖的 Python 包列表。\n- 📦 `data/{吧名}.csv`：存储爬取到的数据。\n- 📩 `logs/{吧名}.log`：存储爬取过程中的日志信息。\n\n## 使用方法\n- 1.⚡安装依赖：\n    * 项目版本：`Python 3.10.7`\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n- 2.🌊配置参数：\n\n    在 config.py 中设置需要爬取的贴吧关键词 KW、爬取起始页数 ST 和终点页数 PN。\n    \n- 3.🚄运行脚本：\n\n    ```bash\n    python main.py\n    ```\n\n    脚本会开始爬取贴吧帖子信息，并将结果存储到 CSV 文件中。\n\n- 4.🌈功能特点：\n\n    * ✅ 使用了 fake_useragent 库生成随机 User-Agent，增加了爬虫的隐蔽性。\n    * ✅ 使用了 rich 库提供的进度条功能，使爬取过程更加可视化。\n    * ✅ 支持设置爬取的起始页数和终点页数，灵活控制爬取范围。\n    * ✅ 使用了多个账号的cookie构建cookie池，提高反爬能力，增加数据获取的健壮性。\n    \n- 5.🚩注意事项：\n\n    * 🚧爬取过程中请遵守网站的规则，不要过于频繁地进行请求，以免被封禁 IP。\n    * 🚥请勿将爬取到的数据用于违法或商业用途，仅限个人学习和研究使用。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviper373%2Fbaidutieba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviper373%2Fbaidutieba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviper373%2Fbaidutieba/lists"}