#刷PT#自动下载PT站的最新FREE种

蜗牛vpsvps教程2021-01-114230

自己有一个大盘机用来刷PT,但不是自动的都是手动来刷,今天在LALA大佬上面看到一个教程,使用VPS自动下载FREE种,来保号或是过新手期,下面分享给大家。

作者地址

https://github.com/cshenxi/ptscripts

安装过程

系统以Debian9为例,安装pip3/依赖

apt -y install git python3-pip
pip3 install bs4 requests lxml

拉取文件:

mkdir -p /opt/freetorrent/torrent && cd /opt/freetorrent
git clone https://github.com/cshenxi/ptscripts.git
cd ptscripts

给执行权限:

chmod +x download_free_PTtorrents_v3_debug.py

编辑:

nano download_free_PTtorrents_v3_debug.py

在这个文件最上方加入一行:

#!/usr/bin/python3

然后要改动的地方,这里我以M-TEAM为例:

site_name = "M-TEAM"
site_url = "https://tp.m-team.cc/torrents.php"
site_cookie = "c_lang; tp=你的cookies" # 注意M-Team的cookies前面必须要有c_lang,否则无法登录成功
url_half = "https://tp.m-team.cc/"
monitor_path = r'/opt/freetorrent/torrent/'
user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36'
referer = 'https://tp.m-team.cc/login.php'
host = 'tp.m-team.cc'

cookie/useragent如何获取?打开Chrome,登录你的M-Team账号,然后按F12:

添加计划任务:

crontab -e

每两个小时执行一次:

0 */2 * * * /usr/bin/python3 /opt/freetorrent/ptscripts/download_free_PTtorrents_v3_debug.py

为验证是否可以正常下载,这里我们最好先自己手动运行一遍:

./download_free_PTtorrents_v3_debug.py

如果正常,你将看到类似这样的回显:

然后在qBittorrent上设置监控文件夹:

然后我可以看到QB在正常下载了:

并且下载的全部都是FREE种:

nexusphp的PT站都可以使用,此教程为转载,不接受反馈提问,因为我也不会,可以到作者的github提问。

 

评论

有免费节点资源,我们会通知你!加入纸飞机订阅群

×
天气预报查看日历分享网页手机扫码留言评论电报频道链接