Skip to content

HWYWL/mzitu-crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mzitu-crawler

爬取mzitu网站的妹子,注意营养

license

环境

python2.7, 3.6

python库

http请求:requests
图片提取:bs4
存储相关: os

下载安装

在终端输入如下命令:

git clone https://github.com/HWYWL/mzitu-crawler.git

使用方法

在当前目录下输入:

cd mzitu-crawler
pip install -r requirements.txt
python main.py

修改爬取的数量

if __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文件夹,首页每套图以存储在其中

老板再来两瓶营养快线

问题建议

About

爬取mzitu网站的妹子,注意营养

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages