其实rss并不难 只要用心就都能学会
这里说下环境,系统 Debian9.4 python版本2.7
看完文章后还有不明白的可以自己去flexget 官网学习,我放的都是自己用的!
安装 flexget
先安装并更新python的pip模块
apt-get update
apt-get install python-pip python-setuptools nano
pip install --upgrade pip
pip2 install flexget
配置 flexget
首先创建 flexget 的配置目录
mkdir /root/.flexget
接着编辑flexget 的配置文件
nano /root/.flexget/config.yml
配置文件模板 自行更换 passkey 即可
templates:
freespace:
free_space:
path: /home/down
space: 10240
qb:
qbittorrent:
path: /home/down
host: localhost
port: 8080
username: admin
password: adminadmin
de:
deluge:
password: "deluge"
path: /home/down
tr:
transmission:
host: localhost
port: 9091
username: truser
password: "trpass"
tasks:
BTSchool:
rss: https://pt.btschool.net/torrentrss.php?rows=10&tea1=1&tea2=1&tea3=1&tea4=1&linktype=dl&passkey=1111111111111111111111
accept_all: yes
template:
- de
HDChina:
rss: https://hdchina.org/torrentrss.php?rows=10&tea15=1&tea16=1&icat=1&ismalldescr=1&isize=1&iuplder=1&linktype=dl&passkey=1111111111111111111111
accept_all: yes
template:
- qb
qbittorrent:
label: HDChina
CHDBits:
rss: https://chdbits.co/torrentrss.php?rows=10&icat=1&ismalldescr=1&isize=1&iuplder=1&linktype=dl&passkey=1111111111111111111111
accept_all: no
if:
- "'CHDPAD' in title": reject
- "'CHDPad' in title": reject
- "'CHD' in title": accept
template:
- tr
U2:
rss: https://u2.dmhy.org/torrentrss.php?rows=10&icat=1&ismalldescr=1&isize=1&iuplder=1&passkey=1111111111111111111111&linktype=dl&passkey=1111111111111111111111
accept_all: no
regexp:
accept_excluding:
- DVD
- ADC
- TTG
- TSDM
from: title
download: /home/torrent/
Mteam-sweety:
rss: https://tp.m-team.cc/torrentrss.php?https=1&rows=10&cat410=1&cat429=1&ismalldescr=1&isize=1&iuplder=1&linktype=dl&passkey=1111111111111111111111
accept_all: no
regexp:
accept:
- sweety
from: title
download: /home/torrent/
GZtown:
rss: https://pt.gztown.net/torrentrss.php?rows=10&icat=1&ismalldescr=1&isize=1&iuplder=1&linktype=dl&passkey=1111111111111111111111
accept_all: no
if:
- "'GZtown' in title": accept
download: /home/torrent/
HDSky:
rss: https://hdsky.me/torrentrss.php?rows=10&tea6=1&tea1=1&tea28=1&tea9=1&tea31=1&tea18=1&linktype=dl&passkey=1111111111111111111111
accept_all: yes
download: /home/torrent/
Ourbits:
rss: https://ourbits.club/torrentrss.php?rows=10&tea1=1&tea2=1&tea3=1&tea12=1&tea42=1&tea31=1&tea46=1&linktype=dl&passkey=1111111111111111111111
accept_all: yes
download: /home/torrent/
使用 flexget
常用命令
- flexget check : 用于检查 config.yml 配置文件是否有格式错误。
- flexget –test execute : 手动模拟一次 RSS 操作,仅供测试,不会下载种子文件到本地。(注意 test 前是 2 个-,显示有问题)
- flexget execute : 手动开始一次 RSS 下载,就等于正式 RSS 了一次。
- flexget status : 查看 flexget 的 RSS 记录。
配置 webui
我们注意到,在第二步里,config 每个配置文件的末尾都加上了一个web_server参数,这个是用来开启 flexget 的 webui 的,需要执行以下命令!
设置 web 密码,注意不太太简单,否则不成功!用户名默认是 flexget
flexget web passwd <要设置的密码>
开启 webui 后台运行
flexget daemon start --daemonize
这是你打开 http://服务器 IP:55555 就能看到 flexget 的 web 界面了,登录后即可在 config 那里直接修改配置文件了!我目前用到的就是这个,其它功能没研究!!
设置自动 RSS
查看 flexget 位置
which flexget
比如我的是/usr/local/bin/flexget
配置自动订阅
crontab -e
选择通过 nano 编辑,这样方便点,然后在末尾加上
*/5 * * * * /usr/local/bin/flexget -c /root/.flexget/config.yml execute
然后保存退出 就表示 5 分钟执行一次订阅了。这个时间你可以根据自己机器的情况修改,建议 2-5 分钟之间!
常见问题及解决方案
多关键字过滤
可以使用and或者or连接 如
- "*中国* and 'CHDBits' in title": accept
这样就可以同时过滤多个标题字段了!
4.2.重置 flexget
这个其实很简单,删除/root/.flexget 目录下除了 config.yml 文件以外的其它文件就可以了!
总结
①安装 flexget
②copy 一个我给的 config.yml 文件示例,根据自己情况修改下,保存退出
③设置刷新间隔 完事!
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持以下吧
请登录后发表评论
注册
社交帐号登录