Coder Social home page Coder Social logo

ledccn / iyuuautoreseed Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 117.0 753 KB

IYUU自动辅种工具,目前能对国内大部分的PT站点自动辅种,支持下载器集群,支持多盘位,支持多下载目录,支持远程连接等。

Home Page: https://iyuu.cn

License: Other

PHP 91.78% Batchfile 0.14% Dockerfile 6.25% Shell 1.83%

iyuuautoreseed's Issues

天雪skyey辅种问题

配置天雪passkey后运行脚本没发现skyey的辅种过程,不知道是不是工具域名没更新的问题。
现在天雪域名为www.skyey2.com
对于skyey自动辅种支持的域名貌似还是www.skyeysnow.com

能否自动开始上传?

自动辅种添加种子,校验完成后,如果是100%的种子,能否自动开始上传?有什么办法可以实现吗?
我现在检验后的种子都是暂停状态,要手动进TR/qB里选种子按开始~~

提交上去到服务器失败

辅种不了,提交到服务器不行。我tr里面有2000种的
ssh记录:
transmission 客户端正在实例化!
transmission:http://192.168.1.196:9091/transmission/rpc Rpc连接 [success]
正在从下载器 clients_0 获取种子哈希……
正在向服务器提交 clients_0 种子哈希……
clients_0 没有查询到可辅种数据

qb到tr转移辅种后未自动辅种

配置文件:

        // 4.【自动辅种必须配置】全局客户端设置(条目不够可以复制)
        'clients'   => array(
            // 全局客户端设置 开始
            # 开始
            array(
                'type'	=>	'transmission',	// 支持:transmission、qBittorrent
                'host'	=>	'http://127.0.0.1:9091/transmission/rpc',		// 警告!注意:transmission/rpc这段别动,你只需要修改 127.0.0.1:9091
                'username'	=>	'',     // 没有用户名请填写null
                'password'	=>	'',     // 没有密码  请填写null
                'BT_backup' =>  '/torrents',                        // 移动做种:如果脚本与当前客户端不在一台机器,必须配置
                'move'      =>  2,      // 0不移动,1移动并辅种,2移动且只在当前客户端辅种
            ),
            # 结束
            # 开始
            array(
                'type'	=>	'qBittorrent',	// 支持:transmission、qBittorrent
                'host'	=>	'http://127.0.0.1:9092',
                'username'	=>	'',
                'password'	=>	'',
                'root_folder'=> 1,   // 创建多文件子目录:0不创建,1创建(下载器默认1)【此处必须与下载器真实配置相同,否则添加任务不会校验!】
                'BT_backup' =>  '/BT_backup',    // 移动做种:必须配置,Linux搜索方法:find / -name BT_backup
                'move'      =>  0,      // 0不移动,1移动并辅种,2移动且只在当前客户端辅种
            ),
            # 结束
            // 全局客户端设置 结束
        ),
        // 5.移动做种必须配置
        'move' =>array(
            'type' => 0,		// 0保持不变,1减,2加,3替换
            'path' =>array(
                // 当前路径 => 目标路径
                '/downloads' => '/volume1',
            ),
            'path_filter'=> array(),          //转移过滤器:不转移此路径内文件
            'path_selector' => array(),       //转移选择器:只转移此路径内文件(为空时,全转移)    【优先级:过滤器 > 选择器】
            'paused'         => 1,      //转移成功,自动开始任务:0开始,1暂停
            'skip_check'     => 0,      //转移成功,跳校验:0不跳、1跳校验
            'delete_torrent' => 1,      //转移成功,删除当前做种:0不删除、1删除
        ),

清空cache:
image

qb下载完成,执行iyuu.php
image

此时缓存:
image

tr只有从qb转移的种,没有自动辅种。
image

(未手动开始任务)再次执行iyuu.php
image
(手动重新开始任务)再次执行iyuu.php
image

我想问下,转移配置里是不是得设置自动开始才会开始多站辅种?
'paused' => 0, //转移成功,自动开始任务:0开始,1暂停

另外,本例多站辅种未成功可能是和 #32 提到的hdarea辅种问题的原因是一样的。

$extra_options['paused'] 设置出错

$extra_options['paused'] = isset($extra_options['paused']) ? $extra_options['paused'] : true;

这里true写错了, 应该改成'true'
AutoReseed.php 这个文件里有几个地方都要改一下
我改了之后qbittorrent添加种子后就是暂停的 transmission我没有试过

SQL Error Table 'nexusphp.torrents_' doesn't exist @ lemonhd / leaguehd

尝试用IYUU Gui辅种,但是这个站点完全无法添加,全部添加种子失败,Gui让尝试手动添加种子,
但是点击Gui给出的种子链接,则会报这个错误:

SQL Error
Table 'nexusphp.torrents_' doesn't exist
in /home/wwwroot/leaguehd.com/download.php, line 80

是不是因为该站点魔改了?

代码结构优化建议

  • 将原先的下载免费种子剥离出来,只做自动辅种。下载免费种涉及到网页爬虫,用户设置不当很容易被网站封号,甚至连带开发者。
  • 源代码中去除 vendor 目录,在release中添加自定义文件的形式给用户分发带有vendor的文件。
  • 自动加载优化,使用composer中的autoload -> psr-4 , classmap , file 配置项进行 Class、Protocols的加载,弃用以下inclue语句
    require_once APP_PATH . '/Class/File.php'; // 文件操作类
    require_once APP_PATH . '/Class/Function.php'; // 函数
    require_once APP_PATH . '/Class/Oauth.php'; // 用户鉴权
    require_once APP_PATH . '/Class/Rpc.php'; // RPC操作类
    require_once APP_PATH . '/Class/TransmissionRPC.class.php'; // transmission
    require_once APP_PATH . '/Class/qBittorrent.php'; // qBittorrent
    require_once APP_PATH . '/Class/uTorrent.php'; // uTorrent
    require_once APP_PATH . '/Class/Bencode.php'; // Bencode编码Bittorrent种子操作类
    function auto_load($classname) {
    set_include_path(APP_PATH.'/Protocols/');
    spl_autoload($classname);
    }
    spl_autoload_extensions('.php');
    spl_autoload_register('auto_load');
  • 增加bittorrent client的接口类,Tr、qB、uT等客户端在实现(implements)接口类的基础上进行开发。
  • wiki直接放入Github提供的功能中

网址修改

铂金家原网址失效了,得在前面加ipv4或者www

站点支持https&http双tracker会导致重复添加任务

不确定这是不是bug,leaguehd站实际使用中出现了几个任务重复添加了;添加完后两个任务都能连接tracker。

另外改进建议:
1、增加linux下执行命令说明到wiki;
2、脚本执行完增加成功输出,目前是靠微信统计报表消息发过来才确认执行完毕;
3、cache文件夹内会保存passkey,安全考虑建议删除;

小小建议-自动删种子

现在支持部分站点自动下载免费种子,但是一旦多了就硬盘会爆炸。

可否支持下自动删种子功能呢。比如分享率在做种多少小时后还没达到就自动删,等等。

dicmusic站问题

官方的实例config.php里没有dicmusic,应该如果配置呢?

请问能否清理下无效种子

首先感谢开发者无私付出,推出IYUU这一pt神器,挽救众多站点,同时也给个人用户带来更好的体验

但从各个站点爬取的种子有部分会被站点或者发布者删除...
随着时间推移,这种无效种子累积越来越多,在辅种过程中出现大量辅种失败的报告,有的甚至卡停很久,这降低了附种效率,也不利于查看结果...

所以个人建议:
是否能抽空清理下这种类型的种子,不知技术上能否简单实现...

请您酌情考虑,谢谢

docker版没有定时自动运行

docker镜像: iyuucn/iyuuautoreseed:latest
客户端:docker版qbittorrent各版本都一样

只有在启动iyuuautoreseed容器的时候会运行一次,之后不会每天自动运行。容器的环境变量添加了cron '0 9 * * 0'
是我哪里理解错了吗?

hdchina辅种遇到cookies过期,但更新cookies后无效.

已经按照教程配置好了cookies和secret id前面部分部分种子已经成功添加到transmission中,后来遇到cookies过期的问题,更新后问题依旧.....通过检查该种子链接发现可能问题并不在于cookies过期,请大卫大佬过目.
过期3

QQ截图20201216101720

如何换绑微信账号?合作站点鉴权失败

今天在群里遇到一个需要换绑微信的群友
以前没有合作站点鉴权的时候只需要重新生成一个令牌然后改config就行了
但是现在改了之后会导致合作站点鉴权失败,所以也就是断绝了更改绑定通知微信的可能
不知道能否开发一个解绑的功能?

群晖运行时报错


root@DSMMSI:/volume3/homes/admin/IYUUAutoReseed# php ./iyuu.php
1580814946.6314 环境变量初始化完成!
1580814946.6315 全局配置载入完成!
PHP Warning:  require_once(/volume3/homes/admin/IYUUAutoReseed/vendor/autoload.php): failed to open stream: No such file or directory in /volume3/homes/admin/IYUUAutoReseed/init.php on line 47

Warning: require_once(/volume3/homes/admin/IYUUAutoReseed/vendor/autoload.php): failed to open stream: No such file or directory in /volume3/homes/admin/IYUUAutoReseed/init.php on line 47
PHP Fatal error:  require_once(): Failed opening required '/volume3/homes/admin/IYUUAutoReseed/vendor/autoload.php' (include_path='.') in /volume3/homes/admin/IYUUAutoReseed/init.php on line 47

Fatal error: require_once(): Failed opening required '/volume3/homes/admin/IYUUAutoReseed/vendor/autoload.php' (include_path='.') in /volume3/homes/admin/IYUUAutoReseed/init.php on line 47

运行到正在从下载器 clients_0 获取种子哈希……之后出现error

transmission 客户端正在实例化!
transmission:http://127.0.0.1:9091/transmission/rpc Rpc连接 [success]
clients_1 用户名或密码未配置,已跳过!

正在从下载器 clients_0 获取种子哈希……
PHP Fatal error: Uncaught Error: Call to undefined function IYUU\Client\transmission\mb_detect_encoding() in /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php:811
Stack trace:
#0 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(798): IYUU\Client\transmission\transmission->cleanRequestData()
#1 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(845): IYUU\Client\transmission\transmission->cleanRequestData()
#2 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(400): IYUU\Client\transmission\transmission->request()
#3 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(953): IYUU\Client\transmission\transmission->get()
#4 /home/pi/IYUUAutoReseed/app/AutoReseed.php(303): IYUU\Client\transmission\transmission->all()
#5 /home/pi/IYUUAutoReseed/app/AutoReseed.php(278): IYUU\AutoReseed::reseed()
#6 /home/pi/IYUUAutoReseed/iyuu.php(31): IYUU\Aut in /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php on line 811

Fatal error: Uncaught Error: Call to undefined function IYUU\Client\transmission\mb_detect_encoding() in /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php:811
Stack trace:
#0 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(798): IYUU\Client\transmission\transmission->cleanRequestData()
#1 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(845): IYUU\Client\transmission\transmission->cleanRequestData()
#2 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(400): IYUU\Client\transmission\transmission->request()
#3 /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php(953): IYUU\Client\transmission\transmission->get()
#4 /home/pi/IYUUAutoReseed/app/AutoReseed.php(303): IYUU\Client\transmission\transmission->all()
#5 /home/pi/IYUUAutoReseed/app/AutoReseed.php(278): IYUU\AutoReseed::reseed()
#6 /home/pi/IYUUAutoReseed/iyuu.php(31): IYUU\Aut in /home/pi/IYUUAutoReseed/vendor/ledccn/bittorrentclient/src/transmission/transmission.php on line 811

关于iyuu对于定义的多个辅种客户端支持的优化建议

1、目前的版本里面,如果我在config.php里面定义了多个下载器,只要其中有任意一个下载器webui无法连接,则所有定义的下载器都不会去连接,会在初始化的时候直接报错,其它所有的下载器都不会尝试发起辅种。

比如我有多个下载器,其中某一台只在特定的时间打开,这样就会影响到其它下载器的辅种。

能否使用循环遍历所有定义的下载器,对于无法连接的下载器自动跳过呢,只有在所有定义的下载器都无法连接时才报错?

+----------------+---------------+-------------+-----------------+--------------+
transmission 客户端正在实例化!
transmission:http://127.0.0.1:****/transmission/rpc Rpc连接 [success]
qBittorrent 客户端正在实例化!
qBittorrent:https://127.0.0.1:**** Rpc连接 [v4.2.5]
qBittorrent 客户端正在实例化!
qBittorrent:https://127.0.0.1:**** Rpc连接 [v4.3.2]
qBittorrent 客户端正在实例化!
[连接错误] https://127.0.0.1:**** qBittorrent Unable to authenticate with Web Api.

2、目前的版本在config.php定义了多个辅种下载器时,在运行时打印的日志里面只会显示client 0, client 1这样,是否能在config.php里面定义一个下载器别名,然后在打印日志里面打印出别名或webui地址?

docker版 qBittorrent v4.3.2未自动开始校验

  • iyuu版本:最新版 v1.10.22
  • NAS系统:openmediavault
  • 软件版本:docker版 qBittorrent v 4.3.1/2
  • 问题:执行辅种命令后,种子在qb中是暂停状态,需要手动点开始,然后才能开始校验,校验后自动进入做种状态。

docker版 Tranmission v3.0 工作正常。
请问这是最新版qb的问题,还是我的qb设置或者iyuu配置文件配置错了?

hdarea辅种问题

新注册hdarea用iyuu自动辅覆盖率很低,手动辅种都能辅上,其他站也能辅上,应该是hdarea的数据很久没更新或不全,大概是手动辅后新增一倍。

大佬,添加计划任务失败。

WIN10添加了自动辅种的计划任务,但是一直提示“操作员或系统管理员拒绝了请求(0x800710E0)”。单独运行“9.执行辅种.cmd”,没有问题,可以辅种。

clients_0 没有查询到可辅种数据

之前还好好的,现在就这样了。TR的种子大概有一万个。

mcj@mcjdeiMac:~/日常使用/GitCode/PT/IYUUAutoReseed$ php iyuu.php 
1619887762.2784 环境变量初始化完成!
1619887762.2791 全局配置载入完成!
1619887762.2795 支持站点JSON载入完成!
1619887762.2795 正在加载composer包管理器...
1619887762.2815 composer依赖载入完成!
1619887762.2815 当前脚本运行环境:Darwin
当前脚本路径:/Users/mcj/日常使用/GitCode/PT/IYUUAutoReseed/iyuu.php
正在初始化运行参数,版本号:1.10.22
当前时间:2021-05-02 00:49:22
chdbits合作站点参数配置不完整,请同时填写passkey和用户id。
合作站点鉴权配置,请查阅:https://www.iyuu.cn/archives/337/

gitee源码仓库:https://gitee.com/ledc/IYUUAutoReseed
github源码仓库:https://github.com/ledccn/IYUUAutoReseed
教程:https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
问答社区:http://wenda.iyuu.cn
【IYUU自动辅种交流】QQ群:859882209、931954050、924099912

正在连接IYUUAutoReseed服务器,查询支持列表……

IYUUAutoReseed自动辅种脚本,目前支持以下站点:
+----------------+---------------+-----------------+---------------+---------------+
| 1. keepfrds    | 2. pthome     | 3. m-team       | 4. hdsky      | 5. tjupt      |
| 6. pter        | 7. hdhome     | 8. btschool     | 9. ourbits    | 10. hddolby   |
| 11. torrentccf | 12. ptmsg     | 13. ttg         | 14. nanyangpt | 15. yingk     |
| 16. hdcity     | 17. nicept    | 18. 52pt        | 19. beitai    | 20. eastgame  |
| 21. ssd        | 22. soulvoice | 23. chdbits     | 24. leaguehd  | 25. ptsbao    |
| 26. hdchina    | 27. hdarea    | 28. hdtime      | 29. 1ptba     | 30. hd4fans   |
| 31. opencd     | 32. joyhd     | 33. dmhy        | 34. upxin     | 35. oshen     |
| 36. discfan    | 37. hdzone    | 38. hdbd        | 39. byr       | 40. ccfbits   |
| 41. hdbits     | 42. ptpbd     | 43. hd-torrents | 44. dicmusic  | 45. skyeysnow |
| 46. pt         | 47. hdroute   | 48. haidan      | 49. hdfans    | 50. dragonhd  |
| 51. hitpt      | 52. pttime    | 53. hdai        | 54. npupt     | 55. hdatmos   |
+----------------+---------------+-----------------+---------------+---------------+

Warning: rmdir(/Users/mcj/日常使用/GitCode/PT/IYUUAutoReseed/torrent/cache/): Directory not empty in /Users/mcj/日常使用/GitCode/PT/IYUUAutoReseed/app/Library/IFile.php on line 170
transmission 客户端正在实例化!
transmission:http://127.0.0.1:9091/transmission/rpc Rpc连接 [success]
正在从下载器 clients_0 获取种子哈希……
正在向服务器提交 clients_0 种子哈希……
clients_0 没有查询到可辅种数据

* Closing connection 0
* Closing connection 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.