elogank/lol-replay-downloader-cli

该软件包最新版本(1.0.0)没有提供许可证信息。

无需任何软件即可下载《英雄联盟》回放CLI,回放保存在云端。

1.0.0 2014-12-02 22:25 UTC

This package is not auto-updated.

Last update: 2024-09-14 16:39:47 UTC


README

本项目为您提供简单命令,轻松下载正在进行的《英雄联盟》回放游戏,如lolkingop.gg功能。回放存储在您的服务器上,可随时观看。
所有下载文件均可解码以解析它们。它使用库:https://github.com/EloGank/lol-replay-downloader

功能

  • 可用的CLI
  • 可用的虚拟机,使用Vagrant(自动安装)
  • 每个文件(数据块和关键帧)都内置了回放解码器
  • 异步系统,允许同时下载一些回放并将日志保存到回放文件夹
  • 如果游戏开始后再开始下载过程,则可以下载之前的数据
  • 如果您提前开始下载过程,可以等待游戏开始
  • 完全可配置

安装

您有两种方式安装此存储库。首先,使用虚拟机,在Windows OS上推荐使用,但不是必需的;其次,手动安装(但不超过2分钟,我发誓)。

虚拟机

如果您想使用虚拟机安装/尝试此项目并避免尚未安装PHP环境时的安装过程,请阅读虚拟机文档。这将花费您一分钟。

如果您想在Windows系统上安装/尝试此项目,我建议您选择虚拟机安装过程。此项目尚未在Windows系统上测试。

手动

只需克隆此项目并运行composer install命令。如果您不知道Composer是什么,请阅读相关文档

配置

在此处查看所有可用配置这里

如何使用

本项目提供唯一命令:php console elogank:replay:download

Usage:
 elogank:replay:download [--async] [--override] region game_id encryption_key

Arguments:
 region                The game region
 game_id               The game id
 encryption_key        The game encryption key

Options:
 --async               The replay download will be asynchronous
 --override            If exists, the replay folder will be override
 --help (-h)           Display this help message.
 --quiet (-q)          Do not output any message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display this application version.
 --ansi                Force ANSI output.
 --no-ansi             Disable ANSI output.
 --no-interaction (-n) Do not ask any interactive question.

输出示例

Retrieve metas...                       OK
Validate game criterias...              OK
Retrieve last infos...                  OK
Download all previous chunks (28)...    OK
Download all previous keyframes (12)... OK

Download current game data :
Downloading chunk       29              OK
Downloading keyframe    13              OK
Downloading chunk       ...

如何获取区域、游戏ID或加密密钥?

获取区域很简单:只需查看文件config/config.yml,所有区域服务器都列在这里。例如,如果您在EUW服务器上玩游戏,则只需使用区域EUW1

从非官方API

对于游戏ID加密密钥,稍微有点困难。实际上,官方Riot API尚未提供检索此数据的API。
要获取它,您必须使用非官方API,如https://github.com/EloGank/lol-php-api,请参阅路由game.retrieve_in_progress_spectator_game_info。请注意,根据新的Riot使用条款,不允许使用其他路由(见下文“重要注意事项”)。

从LoLNexus网站

为了测试目的,您可以简单地访问像 lolnexus 这样的观战网站,点击游戏中的“观战”按钮,然后在命令行中即可获得区域、游戏ID和加密密钥来启动游戏,请参阅行尾。

"C:\Riot Games\League of Legends\RADS\solutions\lol_game_client_sln\releases\0.0.1.xx\deploy\League of Legends.exe" "8394" "LoLLauncher.exe" "" "spectator SERVER_ADDRESS ENCRYPTION_KEY GAME_ID REGION"

示例

"C:\Riot Games\League of Legends\RADS\solutions\lol_game_client_sln\releases\0.0.1.68\deploy\League of Legends.exe" "8394" "LoLLauncher.exe" "" "spectator 185.40.64.163:80 nwP+BEYqHgk4sElnU2uRogoxGPUw1dzE 1234567890 EUW1"

因此,您可以运行以下命令

php console elogank:replay:download EUW1 1234567890 nwP+BEYqHgk4sElnU2uRogoxGPUw1dzE

来自LoLNexus解析器

这里有一个LoLNexus PHP解析器: https://github.com/EloGank/lol-replay-downloader/blob/master/examples/utils/LoLNexusParser.php

用法很简单:您只需通过调用 LoLNexusParser::parseRandom($regionId)LoLNexusParser::parsePlayer($regionId, $playerName) 方法来选择区域,然后它将通过调用 LoLNexusParser::getRegion()LoLNexusParser::getGameId()LoLNexusParser::getEncryptionKey() 方法为您提供运行命令的所有参数。

示例在此处可用: https://github.com/EloGank/lol-replay-downloader/blob/master/examples/download-replay.php#L32-L48

重要提示

根据新的Riot使用条款(2014年10月1日),使用其官方API以外的其他来源的数据是不允许的。因此,解析解码文件使用数据是不允许的。本项目仅提供解码文件的教学目的。

只有当您在游戏开始后的前8分钟内开始下载过程时,才能下载完整游戏。否则,您将无法获得游戏的开头。

报告问题或功能请求

请随意在 问题跟踪器 中打开问题、分叉此项目或建议一个惊人的新功能。

致谢

请参阅 贡献者 列表。

许可

MIT,更多信息

此存储库未经Riot Games授权,并不反映Riot Games或任何官方参与《英雄联盟》制作或管理的人员的观点或意见。
《英雄联盟》和Riot Games是Riot Games Inc.的商标或注册商标。《英雄联盟》(c)Riot Games Inc.