Skip to content

Commit

Permalink
Update preg_match: web address now given instead of IP
Browse files Browse the repository at this point in the history
  • Loading branch information
iggyvolz committed Jun 17, 2015
1 parent 6b90534 commit ea2123e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/utils/LoLNexusParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function parsePlayer($regionId, $playerName, OutputInterface $output = nu

$response = $buzz->get('http://www.lolnexus.com/ajax/get-game-info/' . self::$serverNames[$regionId - 1] . '.json?name=' . urlencode($playerName));

if (!preg_match('/lrf:\/\/spectator [0-9.:]+ (.*) ([0-9]+) ([A-Z0-9]+) [0-9\.]+/', $response->getContent(), $matches)) {
if (!preg_match('/lrf:\/\/spectator [0-9a-zA-Z.:]+ (.*) ([0-9]+) ([A-Z0-9]+) [0-9\.]+/', $response->getContent(), $matches)) {
throw new \RuntimeException('Cannot parse LoL Nexus game page, the game may be ended (sometimes LoLNexus\'s cache is bad), please retry.');
}

Expand Down

0 comments on commit ea2123e

Please sign in to comment.