基于 scrapy 的EXHENTAI下载器
2017-06-16 本文已影响0人
jk625x
由于scrapy足够直观和友好,所以尝试用它写一个简单的exhentai下载器 - - 。
一、前言
- 需要准备e-hentai账号
- 每天下载有配额
二、使用
- 安装python2.7、pyOpenSSL、Twisted、setuptools、Zope.Interface、libxml2、w3lib、scrapy
- 修改setting.py FILES_STORE中填写保存路径
- 执行python main.py


三、源码
整体是这样的结构,入口是main.py

在spider中登录的需要两次,第一次的cookie不完整

pipeline中重写了file_path以确保获得正确的文件名

其他没有什么特别的
To be continued