summaryrefslogtreecommitdiff
path: root/SteamAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'SteamAPI.py')
-rw-r--r--SteamAPI.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/SteamAPI.py b/SteamAPI.py
index cc67f20..47efe1a 100644
--- a/SteamAPI.py
+++ b/SteamAPI.py
@@ -70,10 +70,9 @@ class SteamAPI():
for steamid in cachedids:
steamids_copy.remove(steamid)
- if len(steamids_copy):
+ if steamids_copy:
steamidlist = ','.join([str(x) for x in steamids_copy])
- url = 'https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?format=json&key=%s&steamids=%s' % (self.token, steamidlist)
- # print(url)
+ url = 'https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?format=json&key=%s&steamids=%s' % (self.token, steamidlist)
response = urlopen(url)
if response.status != 200:
print('Isn\'t this an HTTPError?')
@@ -120,7 +119,6 @@ class SteamAPI():
return json.loads(cache)
url = 'https://api.steampowered.com/ISteamUser/GetFriendList/v0001/?key=%s&steamid=%s&relationship=friend' % (self.token, str(steamid))
- # print(url)
try:
response = urlopen(url)
data = response.read().decode('utf-8')
@@ -214,11 +212,8 @@ class SteamAPI():
if cache:
jsondata = json.loads(cache)
return jsondata
- else:
- print('nocache')
url = 'http://api.steampowered.com/ISteamUserStats/GetPlayerAchievements/v0001/?key=%s&steamid=%s&appid=%s' % (self.token, str(steamid), str(gameid))
- print(url)
try:
response = urlopen(url)
data = response.read().decode('utf-8')