sergey-s-moiseev/torrent-scraper
Composer 安装命令:
composer require sergey-s-moiseev/torrent-scraper
包简介
Provide an abstraction to seach for torrent files on many websites.
关键字:
README 文档
README
About
This library provides an abstraction to search for torrent files accross some torrent websites.
Usage
<?php $scraperService = new \SergeySMoiseev\TorrentScraper\TorrentScraperService([ \SergeySMoiseev\TorrentScraper\Adapter\EzTvAdapter::ADAPTER_NAME, \SergeySMoiseev\TorrentScraper\Adapter\KickassTorrentsAdapter::ADAPTER_NAME ]); $results = $scraperService->search('query'); foreach ($results as $result) { $result->getName(); $result->getSource(); $result->getSeeders(); $result->getLeechers(); $result->getTorrentUrl(); $result->getMagnetUrl(); $result->getDetailsUrl(); $result->getCategory(); $result->getSize(); }
Additional torrents info
For scrap Seeds and Peers by Announce trackers use python daemon in /daemon folder
Daemon usage
python daemon/main.py
Server was started on 0.0.0.0:5000 (by default) for get additional information you need to send post JSON request [Content-Type:application/json] on server
{"data":
{
"trackers": ["udp://tracker1.wasabii.com.tw:6969/announce","…"],
"hashes": ["89925fb48cae260801f35fb7175530bf6e5e055a", "…"]
},
"callback": "http://yousite.url/callback_action",
"private_key": "your_ip_key"
}
Where:
- trackers - list of announce servers
- hashes - torrent hashes
- callback - url to you callback action for result JSON ('http://' or 'https://" is
important!) - private_key - self generated key for protect your action (
recommendation:make new key for each request) ``
Result JSON format:
{"data":
[
{"89925fb48cae260801f35fb7175530bf6e5e055a": {"peers": 1234, "seeds": 4321},
"…"
]
}
<?php $scraperService = new \SergeySMoiseev\TorrentScraper\TorrentScraperService(); $query = [ "trackers": ["udp://tracker1.wasabii.com.tw:6969/announce","…"], "hashes": ["89925fb48cae260801f35fb7175530bf6e5e055a", "…"] ]; $results = $scraperService->scrap($query, "http://yousite.url/callback_action", "your_ip_key");
Result will come on callback URL after collect information from announce trackers
Check Daemon is running
<?php $scraperService = new \SergeySMoiseev\TorrentScraper\TorrentScraperService(); $results = $scraperService->ping();
Available adapters
sergey-s-moiseev/torrent-scraper 适用场景与选型建议
sergey-s-moiseev/torrent-scraper 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 362 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 01 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「torrent」 「kickass」 「piratebay」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sergey-s-moiseev/torrent-scraper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sergey-s-moiseev/torrent-scraper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sergey-s-moiseev/torrent-scraper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Extract media information from torrent-like filename
Composer version of torrent-rw https://github.com/adriengibrat/torrent-rw
PHP Transmission client
Provide an abstraction to seach for torrent files on many websites.
PHP 5.4 wrapper for PutIO's OAuth API (v2)
Fork of unmaintained kleiram/transmission-php PHP Transmission RPC client library
统计信息
- 总下载量: 362
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-28