静看光阴荏苒
不管不顾不问不说也不念

自动下载PT站的最新FREE种

RSS订阅下载是刷子们普遍用的一种方式,但这种方法最明显的弊端就是无法选择性的下载种子,如果我能够选择只下载FREE种,那刷出来的数据岂不是更漂亮?所以现在有人就写了这么一个py脚本,可以实现这个功能啦:

https://tieba.baidu.com/p/6123226674
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种:

赞(7)
未经允许不得转载:荒岛 » 自动下载PT站的最新FREE种
分享到: 更多 (0)

评论 25

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    别的站也一样嘛大佬 :mrgreen:

    Lixiaobai2335年前 (2019-07-10) MIUI Browser 10.8.3 MIUI Browser 10.8.3 Android 5.1.1 Android 5.1.1回复
    • nexusphp的基本就是这样。。

      LALA5年前 (2019-07-11) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    硬盘吃不消 :eek:

    瞎折腾5年前 (2019-07-10) Google Chrome 75.0.3770.101 Google Chrome 75.0.3770.101 Android 8.1.0 Android 8.1.0回复
  3. #3

    那么多片子几百年也看不完 :neutral:

    橘子5年前 (2019-07-10) Google Chrome 72.0.3626.87 Google Chrome 72.0.3626.87 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    我靠这个字体,不行了不行了肯定是我撸多了

    南黎5年前 (2019-07-10) Google Chrome 75.0.3770.101 Google Chrome 75.0.3770.101 Android 9 Android 9回复
  5. #5

    还得把权限改一改

    Chthon5年前 (2019-07-11) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 加上了

      LALA5年前 (2019-07-11) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    2小时一次能改成2分钟吗

    why5年前 (2019-07-11) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 可以,crontab前面改成下面的就行了 :mrgreen:
      */2 * * * *

      MADAO5年前 (2019-07-12) Safari 13.0 Safari 13.0 Mac OS X  10.15 Mac OS X 10.15回复
  7. #7

    哇偶,之前站不是被墙了么,为什么现在又恢复了呢? :mrgreen:

    瑾猫5年前 (2019-07-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 墙抽风了?

      LALA5年前 (2019-07-12) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  8. #8

    qbittorrent无法默认设定单种限速,上传超过10M/s,然后被判定盒子。硪嚯,相当于白给

    谁知道呢5年前 (2019-07-13) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  9. #9

    lala可以写一下Gazelle的安装教程吗,那个框架前后端分离,挺不错的 :razz:

    haig2335年前 (2019-08-01) Google Chrome 75.0.3770.143 Google Chrome 75.0.3770.143 Android 7.1.2 Android 7.1.2回复
    • 相信我这玩意就算装起来了,玩两天你肯定就删了。。

      LALA5年前 (2019-08-01) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 我就想装一下,但是教程我看不太懂,希望大佬可以出个教程

        haig2335年前 (2019-08-08) Google Chrome 76.0.3809.87 Google Chrome 76.0.3809.87 Mac OS X  10.13.6 Mac OS X 10.13.6回复
  10. #10

    只适用于QB吗?

    唐风月5年前 (2019-08-02) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • Deluge应该也可以,有监控文件夹自动加种的客户端都可以。

      LALA5年前 (2019-08-02) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  11. #11

    HDC 不适用,下载的torrent无法添加识别 (deluge 添加 .invalid后缀 :?:

    一曲长歌辞烟雨5年前 (2019-08-09) Google Chrome 76.0.3809.100 Google Chrome 76.0.3809.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • HDC这站刷不起,刷子太多了。。盒子都抢不到多少带宽。。

      LALA5年前 (2019-08-09) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  12. #12

    https://imgw-s1.p1e.cn/2019/08/29/d3df1a8fea6a071a50909e345834ec4f.png
    像这样周末处理

    nif5年前 (2019-08-29) Google Chrome 76.0.3809.132 Google Chrome 76.0.3809.132 Windows 10 x64 Edition Windows 10 x64 Edition回复
  13. #13

    MT的药好难搞

    ji23189454年前 (2020-01-13) Sogou Explorer Sogou Explorer Windows 7 x64 Edition Windows 7 x64 Edition回复
  14. #14

    flexget + nexusphp 插件不香吗

    znew4年前 (2020-10-14) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 Mac OS X  10.15.6 Mac OS X 10.15.6回复
  15. #15

    怎么知道定时任务是否创建成功嘞,想要测试咋测试嘞

    tefuir2年前 (2022-04-02) Microsoft Edge 99.0.1150.55 Microsoft Edge 99.0.1150.55 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿