• 前言

    最近蹭到一台6T杜甫,准备用来做保种姬。奈何站点太多不想动手,于是考虑到使用rss插件配合脚本实现自动保种。

环境配置

  • pip
    	apt-get install python-pip
    
  • deluge
    	星大脚本一键安装
    	bash <(wget --no-check-certificate -qO- https://github.com/Aniverse/inexistence/raw/master/inexistence.sh)
    
  • flexget
    	pip install flexget
    	flexget -V	//查看版本号
    	cd ~
    	mkdir .flexget && cd .flexget	//一般要手动创建配置文件夹
    	vim config.yml	//严格使用空格缩进,不要用tab
    

    配置文件如下:

    	tasks:
    	 your_task_name:	//你的任务名称,可以添加多个任务
    	  rss: your_rss_url	//站点提供的rss连接
    	  accept_all: yes	//种子过滤
    	  download: /home/ljz/deluge/watch	//种子下载位置
    
  • flexget-nexusphp(用于筛选免费/热门种子)
    	cd ~/.flexget
    	mkdir plugins && cd plugins	//创建插件flexget插件目录
    	使用wget 从https://github.com/Juszoe/flexget-nexusphp/releases下载最新的.py插件到当前目录
    

    配置文件:

    	//添加下方代码与accept_all同级
    	//并且将accept_all的值改为no
    	nexusphp:
    	 cookie: 'you_cookie'
    	 seeders:
    	  min: 1
    	 leechers:
    	  min: 20
    

    适配情况如下:这里

  • shall(用于监控磁盘,删除较老种子。也可以通过deluge实现)
    	vim ~/clean_download.sh
    	#!/bin/sh
    	cd 你的deluge文件下载位置
    	while [ `du -g ./ | awk '{print $1}'` -gt 体积阈值(MB) ];
    	do
    	    ls -tb | tail -n1 | xargs rm -f
    	done
    
    	crontab -e
    	#添加一行(2分钟更新一次rss)
    	*/2 * * * * /usr/local/bin/flexget --cron execute
    	#然后保存重启cron
    	service cron restart
    

开始使用

  • 开启flexget
    	flexget --test execute	//测试一下配置是否正常
    	flexget --cron execute //执行flexget
    	flexget statue //查看执行状态
    	cat ~/.flexget/flexget.log //查看log
    
  • 进入deluge WebUI
  • preference -> download -> Autoadd .torrent files from:
  • 设置为你使用flexget下载种子的位置即可

最后

  • 2020.5.1 更新一下关于cookie的一个issue这里

What is broken can be reforged.