Skip to content

Commit 2c0b377

Browse files
committed
Cleaned URL templates
1 parent 0795bfa commit 2c0b377

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sc2reader/resources.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ def __getstate__(self):
914914

915915

916916
class Map(Resource):
917-
url_template = "https://{0}-s2-depot.classic.blizzard.com/{1}.s2ma"
917+
url_template = "https://{}-s2-depot.classic.blizzard.com/{}.s2ma"
918918

919919
def __init__(self, map_file, filename=None, region=None, map_hash=None, **options):
920920
super(Map, self).__init__(map_file, filename, **options)
@@ -1021,7 +1021,7 @@ class GameSummary(Resource):
10211021
that the data is not necessarily in the places we expect.
10221022
"""
10231023

1024-
url_template = "https://{0}-s2-depot.classic.blizzard.com/{1}.s2gs"
1024+
url_template = "https://{}-s2-depot.classic.blizzard.com/{}.s2gs"
10251025

10261026
#: Game speed
10271027
game_speed = str()
@@ -1450,9 +1450,9 @@ def __str__(self):
14501450
class MapHeader(Resource):
14511451
"""**Experimental**"""
14521452

1453-
base_url_template = "https://{0}-s2-depot.classic.blizzard.com/{1}.{2}"
1454-
url_template = "https://{0}-s2-depot.classic.blizzard.com/{1}.s2mh"
1455-
image_url_template = "https://{0}-s2-depot.classic.blizzard.com/{1}.s2mv"
1453+
base_url_template = "https://{}-s2-depot.classic.blizzard.com/{}.{}"
1454+
url_template = "https://{}-s2-depot.classic.blizzard.com/{}.s2mh"
1455+
image_url_template = "https://{}-s2-depot.classic.blizzard.com/{}.s2mv"
14561456

14571457
#: The name of the map
14581458
name = str()

sc2reader/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DepotFile(object):
2020
"""
2121

2222
#: The url template for all DepotFiles
23-
url_template = "https://{0}-s2-depot.classic.blizzard.com{1}/{2}.{3}"
23+
url_template = "https://{}-s2-depot.classic.blizzard.com{}/{}.{}"
2424

2525
def __init__(self, bytes):
2626
#: The server the file is hosted on

0 commit comments

Comments
 (0)