{"id":15442651,"url":"https://github.com/jack-cherish/python-spider","last_synced_at":"2025-05-13T15:10:55.157Z","repository":{"id":37276093,"uuid":"90349239","full_name":"Jack-Cherish/python-spider","owner":"Jack-Cherish","description":":rainbow:Python3网络爬虫实战：淘宝、京东、网易云、B站、12306、抖音、笔趣阁、漫画小说下载、音乐电影下载等","archived":false,"fork":false,"pushed_at":"2024-08-19T07:32:03.000Z","size":1277,"stargazers_count":18732,"open_issues_count":21,"forks_count":5995,"subscribers_count":635,"default_branch":"master","last_synced_at":"2025-04-23T18:55:05.958Z","etag":null,"topics":["python","python-spider","python3","webspider"],"latest_commit_sha":null,"homepage":"https://cuijiahua.com/blog/spider/","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/Jack-Cherish.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":"2017-05-05T07:28:13.000Z","updated_at":"2025-04-23T14:16:18.000Z","dependencies_parsed_at":"2022-07-10T02:46:06.055Z","dependency_job_id":"eca2ce88-e1be-43ae-a3b1-3b6eb948388f","html_url":"https://github.com/Jack-Cherish/python-spider","commit_stats":{"total_commits":306,"total_committers":9,"mean_commits":34.0,"dds":0.1633986928104575,"last_synced_commit":"60b7ed839713ccf00bb30fe2b203a6b45d7459aa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack-Cherish%2Fpython-spider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack-Cherish%2Fpython-spider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack-Cherish%2Fpython-spider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack-Cherish%2Fpython-spider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jack-Cherish","download_url":"https://codeload.github.com/Jack-Cherish/python-spider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969249,"owners_count":21992263,"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":["python","python-spider","python3","webspider"],"created_at":"2024-10-01T19:29:05.351Z","updated_at":"2025-05-13T15:10:50.109Z","avatar_url":"https://github.com/Jack-Cherish.png","language":"Python","readme":"# 注：2020年最新连载教程请移步：[Python Spider 2020](https://github.com/Jack-Cherish/python-spider/tree/master/2020 \"Python Spider 2020\")\n\n免责声明：\n\n大家请以学习为目的使用本仓库，爬虫违法违规的案件：https://github.com/HiddenStrawberry/Crawler_Illegal_Cases_In_China\n\n本仓库的所有内容仅供学习和参考之用，禁止用于商业用途。任何人或组织不得将本仓库的内容用于非法用途或侵犯他人合法权益。本仓库所涉及的爬虫技术仅用于学习和研究，不得用于对其他平台进行大规模爬虫或其他非法行为。对于因使用本仓库内容而引起的任何法律责任，本仓库不承担任何责任。使用本仓库的内容即表示您同意本免责声明的所有条款和条件。\n\n# Python Spider\n\n原创文章每周最少两篇，**后续最新文章**会在[【公众号】](https://cuijiahua.com/wp-content/uploads/2020/05/gzh-w.jpg)首发，视频[【B站】](https://space.bilibili.com/331507846)首发，大家可以加我[【微信】](https://cuijiahua.com/wp-content/uploads/2020/05/gzh-w.jpg)进**交流群**，技术交流或提意见都可以，欢迎**Star**！\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cuijiahua.com/wp-content/uploads/2020/05/gzh-w.jpg\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/weChat-微信群-blue.svg\" alt=\"微信群\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://cuijiahua.com/wp-content/uploads/2020/05/gzh-w.jpg\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-Jack%20Cui-lightgrey.svg\" alt=\"公众号\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://space.bilibili.com/331507846\"\u003e\u003cimg src=\"https://img.shields.io/badge/bilibili-哔哩哔哩-critical\" alt=\"B站\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.zhihu.com/people/Jack--Cui\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/zhihu-知乎-informational\" alt=\"知乎\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://blog.csdn.net/c406495762\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/csdn-CSDN-red.svg\" alt=\"CSDN\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.toutiao.com/c/user/token/MS4wLjABAAAA5gJtmezUJ6vli2hZvnN13iLnzKLpuF8gGHeS0iVlmNs/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/toutiao-%E5%A4%B4%E6%9D%A1-important.svg\" alt=\"头条\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://juejin.im/user/5ea2ca74e51d4546b50d5f9f\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/juejin-掘金-blue.svg\" alt=\"掘金\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 声明\n\n* 代码、教程**仅限于学习交流，请勿用于任何商业用途！**\n\n## 目录\n\n* [爬虫小工具](#爬虫小工具)\n    * [文件下载小助手](https://github.com/Jack-Cherish/python-spider/blob/master/downloader.py \"悬停显示\")\n* [爬虫实战](#爬虫实战)\n    * [笔趣看小说下载](https://github.com/Jack-Cherish/python-spider/blob/master/biqukan.py \"悬停显示\")\n    * [百度文库免费文章下载助手_rev1](https://github.com/Jack-Cherish/python-spider/blob/master/baiduwenku.py \"悬停显示\")\n    * [百度文库免费文章下载助手_rev2](https://github.com/Jack-Cherish/python-spider/blob/master/baiduwenku_pro_1.py \"悬停显示\")\n    * [《帅啊》网帅哥图片下载](https://github.com/Jack-Cherish/python-spider/blob/master/shuaia.py \"悬停显示\")\n    * [构建代理IP池](https://github.com/Jack-Cherish/python-spider/blob/master/daili.py \"悬停显示\")\n    * [《火影忍者》漫画下载](https://github.com/Jack-Cherish/python-spider/tree/master/cartoon \"悬停显示\")\n    * [财务报表下载小助手](https://github.com/Jack-Cherish/python-spider/blob/master/financical.py \"悬停显示\")\n    * [一小时入门网络爬虫](https://github.com/Jack-Cherish/python-spider/tree/master/one_hour_spider \"悬停显示\")\n    * [抖音App视频下载](https://github.com/Jack-Cherish/python-spider/tree/master/douyin \"悬停显示\")\n    * [GEETEST验证码识别](https://github.com/Jack-Cherish/python-spider/blob/master/geetest.py \"悬停显示\")\n    * [12306抢票小助手](https://github.com/Jack-Cherish/python-spider/blob/master/12306.py \"悬停显示\")\n    * [百万英雄答题辅助系统](https://github.com/Jack-Cherish/python-spider/tree/master/baiwan \"悬停显示\")   \n    * [网易云音乐免费音乐批量下载](https://github.com/Jack-Cherish/python-spider/tree/master/Netease \"悬停显示\")\n    * [B站免费视频和弹幕批量下载](https://github.com/Jack-Cherish/python-spider/tree/master/bilibili \"悬停显示\")\n    * [京东商品晒单图下载](https://github.com/Jack-Cherish/python-spider/tree/master/dingdong \"悬停显示\")\n    * [正方教务管理系统个人信息查询](https://github.com/Jack-Cherish/python-spider/tree/master/zhengfang_system_spider \"悬停显示\")\n* [其它](#其它)\n\n## 爬虫小工具\n\n* downloader.py:文件下载小助手\n\n\t一个可以用于下载图片、视频、文件的小工具，有下载进度显示功能。稍加修改即可添加到自己的爬虫中。\n\t\n\t动态示意图：\n\t\n\t![image](https://raw.githubusercontent.com/Jack-Cherish/Pictures/master/9.gif)\n\n## 爬虫实战\n \n * biqukan.py:《笔趣看》盗版小说网站，爬取小说工具\n\n\t第三方依赖库安装：\n\n\t\tpip3 install beautifulsoup4\n\n\t使用方法：\n\n\t\tpython biqukan.py\n\n * baiduwenku.py: 百度文库word文章爬取\n\t\n\t原理说明：http://blog.csdn.net/c406495762/article/details/72331737\n\t\n\t代码不完善，没有进行打包，不具通用性，纯属娱乐。\n\t\n * shuaia.py: 爬取《帅啊》网，帅哥图片\n\n\t《帅啊》网URL：http://www.shuaia.net/index.html\n\n\t原理说明：http://blog.csdn.net/c406495762/article/details/72597755\n\t\n\t第三方依赖库安装：\n\t\n\t\tpip3 install requests beautifulsoup4\n\t\t\n * daili.py: 构建代理IP池\n\n\t原理说明：http://blog.csdn.net/c406495762/article/details/72793480\n\t\n\t\n * carton: 使用Scrapy爬取《火影忍者》漫画\n\n\t代码可以爬取整个《火影忍者》漫画所有章节的内容，保存到本地。更改地址，可以爬取其他漫画。保存地址可以在settings.py中修改。\n\t\n\t动漫网站：http://comic.kukudm.com/\n\t\n\t原理说明：http://blog.csdn.net/c406495762/article/details/72858983\n\t\n * hero.py: 《王者荣耀》推荐出装查询小助手\n\n\t网页爬取已经会了，想过爬取手机APP里的内容吗？\n\t\n\t原理说明：http://blog.csdn.net/c406495762/article/details/76850843\n\t\n * financical.py: 财务报表下载小助手\n\n\t爬取的数据存入数据库会吗？《跟股神巴菲特学习炒股之财务报表入库(MySQL)》也许能给你一些思路。\n\t\n\t原理说明：http://blog.csdn.net/c406495762/article/details/77801899\n\t\n\t动态示意图：\n\t\n\t![image](https://raw.githubusercontent.com/Jack-Cherish/Pictures/master/10.gif)\n\t\n * one_hour_spider:一小时入门Python3网络爬虫。\n\n\t原理说明:\n\t\n\t * 知乎：https://zhuanlan.zhihu.com/p/29809609\n\t * CSDN：http://blog.csdn.net/c406495762/article/details/78123502\n\t\n\t本次实战内容有：\n\t\n\t * 网络小说下载(静态网站)-biqukan\n\t * 优美壁纸下载(动态网站)-unsplash\n\t * 视频下载\n\t \n * douyin.py:抖音App视频下载\n \n\t抖音App的视频下载，就是普通的App爬取。\n\n\t原理说明:\n\t\n\t * 个人网站：http://cuijiahua.com/blog/2018/03/spider-5.html\n\t\n * douyin_pro:抖音App视频下载（升级版）\n \n\t抖音App的视频下载，添加视频解析网站，支持无水印视频下载，使用第三方平台解析。\n\n\t原理说明:\n\t\n\t * 个人网站：http://cuijiahua.com/blog/2018/03/spider-5.html\n\t \n * douyin:抖音App视频下载（升级版2）\n \n\t抖音App的视频下载，添加视频解析网站，支持无水印视频下载，通过url解析，无需第三方平台。\n\t\n\t原理说明:\n\t\n\t * 个人网站：http://cuijiahua.com/blog/2018/03/spider-5.html\n\t \n\t动态示意图：\n\t\n\t![image](https://github.com/Jack-Cherish/Pictures/blob/master/14.gif)\n\t\n * geetest.py:GEETEST验证码识别\n \n \t原理说明:\n\t\n\t 无\n\t\n * 12306.py:用Python抢火车票简单代码\n \n\t可以自己慢慢丰富，蛮简单，有爬虫基础很好操作，没有原理说明。\n\t\n * baiwan:百万英雄辅助答题\n \n\t效果图：\n\t\n\t![image](https://github.com/Jack-Cherish/Pictures/blob/master/11.gif)\n\t\n\t原理说明：\n\t\n\t* 个人网站：http://cuijiahua.com/blog/2018/01/spider_3.html\n\t\n  \t功能介绍：\n\t\n\t服务器端，使用Python（baiwan.py）通过抓包获得的接口获取答题数据，解析之后通过百度知道搜索接口匹配答案，将最终匹配的结果写入文件（file.txt)。\n\t\n\t手机抓包不会的朋友，可以看下我的早期[手机APP抓包教程](http://blog.csdn.net/c406495762/article/details/76850843 \"悬停显示\")。\n\t\n\tNode.js（app.js）每隔1s读取一次file.txt文件，并将读取结果通过socket.io推送给客户端（index.html）。\n\t\n\t亲测答题延时在3s左右。\n\t\n\t声明：没做过后端和前端，花了一天时间，现学现卖弄好的，javascript也是现看现用，百度的程序，调试调试而已。可能有很多用法比较low的地方，用法不对，请勿见怪，有大牛感兴趣，可以自行完善。\n\n * Netease:根据歌单下载网易云音乐\n \t\n\t效果图：\n\t\n\t![image](https://github.com/Jack-Cherish/Pictures/blob/master/13.gif)\n\t\n\t原理说明：\n\t\n\t暂无\n\t\n\t功能介绍：\n\t\n\t根据music_list.txt文件里的歌单的信息下载网易云音乐，将自己喜欢的音乐进行批量下载。\n\n * bilibili：B站视频和弹幕批量下载\n \t\n\t原理说明：\n\t\n\t暂无\n\t\n\t使用说明：\n\t\n        python bilibili.py -d 猫 -k 猫 -p 10\n\n        三个参数：\n        -d\t保存视频的文件夹名\n        -k\tB站搜索的关键字\n        -p\t下载搜索结果前多少页\n\t\n * jingdong：京东商品晒单图下载\n \n \t效果图：\n\t\n\t![image](https://github.com/Jack-Cherish/Pictures/blob/master/jd.gif)\n \t\n\t原理说明：\n\t\n\t暂无\n\t\n\t使用说明：\n\t\n        python jd.py -k 芒果\n\t\n         三个参数：\n        -d\t保存图片的路径，默认为fd.py文件所在文件夹\n        -k\t搜索关键词\n        -n  \t下载商品的晒单图个数，即n个商店的晒单图\n\n * zhengfang_system_spider：对正方教务管理系统个人课表，个人学生成绩，绩点等简单爬取\n \n \t效果图：\n\t\n\t![image](/zhengfang_system_spider/screenshot/zf.png)\n \t\n\t原理说明：\n\t\n\t暂无\n\t\n\t使用说明：\n\t\n        cd zhengfang_system_spider\n        pip install -r requirements.txt\n        python spider.py\n\n## 其它\n\n * 欢迎 Pull requests，感谢贡献。\n \n 更多精彩，敬请期待！\n\n\u003ca name=\"微信\"\u003e\u003c/a\u003e  \u003ca name=\"公众号\"\u003e\u003c/a\u003e\n\n\u003cimg src=\"https://ftp.bmp.ovh/imgs/2020/07/112254f0199e3d4f.jpg\" alt=\"wechat\" width=\"400\" height=\"200\" align=\"bottom\" /\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack-cherish%2Fpython-spider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjack-cherish%2Fpython-spider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack-cherish%2Fpython-spider/lists"}