Skip to content

Commit

Permalink
Fix U.GG provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Sep 29, 2019
1 parent cb77bbe commit 32c4047
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Legendary Rune Maker/Data/Providers/UGGProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class UGGProvider : Provider

private const string UGGApiVersion = "1.1";
private const string UGGDataVersion = "1.2";
private const string UGGOverviewVersion = "1.2.5";
private const string UGGOverviewVersion = "1.2.6";

private readonly static IDictionary<int, Position> IdToPosition = new Dictionary<int, Position>
{
Expand All @@ -39,7 +39,7 @@ private async Task<string> GetLolUGGVersion()
if (_LolUGGVersion == null)
{
var page = await WebCache.String("https://u.gg", soft: true);
var scriptUrl = Regex.Match(page, @"(?<=<script src="").*main.*\.js").Value;
var scriptUrl = Regex.Match(page, @"src=""(.*/main\..*?\.js)").Groups[1].Value;

var scriptText = await WebCache.String(scriptUrl, soft: true);
var versionsJson = Regex.Match(scriptText, @"(?<=\=)\[\{value:""\d+_\d+.*?]").Value;
Expand Down

0 comments on commit 32c4047

Please sign in to comment.