1024_dagaier_spider icon indicating copy to clipboard operation
1024_dagaier_spider copied to clipboard

爬取草榴论坛达盖尔的旗帜分类下第1-10页帖子的图片,默认8线程,需自备梯子,跨平台。小撸怡情,大撸伤身,强撸灰飞烟灭。

caoliu_1024_dagaier_spider

爬取草榴论坛"达盖尔的旗帜"分类下的主题图片

https://raw.githubusercontent.com/cary-zhou/caoliu_1024_dagaier_spider/master/dagaier.zip

运行:

linux:
python ./达盖尔.py
or
windows:
python .\达盖尔.py

环境准备:

windows or Linux

pip install pyquery
pip install requests
pip install -U requests[socks]

修改参数:

修改代理地址为自己SS或SSR监听的地址端口
proxy={"http":"socks5h://127.0.0.1:1088","https":"socks5h://127.0.0.1:1088"}

请合理设置线程数
work_manager=ThreadManager(8)

请修改需要爬取的主题分页数
while offset<10: #主题列表分页数

预编译二进制:

压缩包:dagaier.zip,是windows下直接可双击执行的exe文件,
使用时需要解压exe可执行文件出来,不要在zip压缩管理器内直接双击执行,免得爬虫运行完了找不到肉。
然后启动你的SSR代理->选项设置->本地端口,填1088,因为程序内手写了通过本地socks5h://127.0.0.1:1088爬梯。
如图:
image
爬取到的资源放在exe同级目录的images文件夹下,每个帖子每个文件夹分开存放,文件夹名就是帖子标题名。