爬取mzitu网站的妹子,注意营养
python2.7, 3.6
http请求:requests
图片提取:bs4
存储相关: os
在终端输入如下命令:
git clone https://github.com/HWYWL/mzitu-crawler.git
在当前目录下输入:
cd mzitu-crawler
pip install -r requirements.txt
python main.pyif __name__ == '__main__': # 当前页 current = 1 # 总页数 total = 100 while current < total: mz = MeiZe("http://www.mzitu.com/page/", current) mz.domainHtml() mz.getMaxPage() mz.downloading() current += 1
稍等几分钟后,当前目录下生成Mzitu文件夹,首页每套图以存储在其中
- 联系我的邮箱:ilovey_hwy@163.com
- 我的博客:http://www.hwy.ac.cn
- GitHub:https://github.com/HWYWL