Skip to content

Commit 2d47a90

Browse files
committed
Update new Battle.net profile url
1 parent e7f8ade commit 2d47a90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sc2reader/objects.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def __init__(self, pid, slot_data, detail_data, attribute_data):
241241
#: The Battle.net region the entity is registered to
242242
self.region = GATEWAY_LOOKUP[detail_data["bnet"]["region"]]
243243

244+
#: The Battle.net region id the entity is registered to
245+
self.region_id = detail_data["bnet"]["region"]
246+
244247
#: The Battle.net subregion the entity is registered to
245248
self.subregion = detail_data["bnet"]["subregion"]
246249

@@ -258,7 +261,7 @@ class User(object):
258261

259262
#: The Battle.net profile url template
260263
URL_TEMPLATE = (
261-
"http://{region}.battle.net/sc2/en/profile/{toon_id}/{subregion}/{name}/"
264+
"https://starcraft2.com/en-us/profile/{region_id}/{subregion}/{toon_id}"
262265
)
263266

264267
def __init__(self, uid, init_data):

0 commit comments

Comments
 (0)