def setup(): client = SteamClient() try: client.anonymous_login() except: error_message = traceback.format_exc() now = str(datetime.now()) print(now + ' - Error:\n' + error_message + '\n\n\n') time.sleep(60) setup() checkForUpdates(client)
def _get_depot_list(self): """Get a list of depots for the app. Returns the list of depots """ result = [] client = SteamClient() client.anonymous_login() info = client.get_product_info(apps=[self.app_id]) for depot in list(info['apps'][self.app_id]['depots']): # Only store depots with numeric value if depot.isnumeric(): result.append(int(depot)) return result
#!/usr/bin/env python import steam from steam.client import SteamClient from steam.client.cdn import CDNClient import os.path # Configure OS (Linux/Windows) system = "Linux" # Initialize SteamClient and login client = SteamClient() client.anonymous_login() # Initialize CDN client mycdn = CDNClient(client) # Try to find the correct depot needle = False for depot in mycdn.get_manifests(403240): if depot.name == 'Squad Dedicated Server Depot ' + system: needle = depot break # Check if the depot information could be found if needle: # Get the last update / creation time as string lastUpdate = str(needle.creation_time) # Initialize a default oldLastUpdate oldLastUpdate = 0
import json from steam.client import SteamClient from steam.client.cdn import CDNClient from steam.enums.emsg import EMsg import pandas as pd #Source #http://api.steampowered.com/ISteamApps/GetAppList/v0002/ mysteam = SteamClient() mysteam.anonymous_login() mycdn = CDNClient(mysteam) count=0 info=[] with open('steam_ids.json',encoding='utf-8') as json_file: data = json.load(json_file) counter=1000 for entry in data['applist']['apps']: try: if counter < 1: counter = 1000 out = pd.DataFrame(info) out.to_csv("depot_id_steam_checkpoint.csv") else: counter -= 1 print(entry['appid'],entry['name']) data = mycdn.get_app_depot_info(int(entry['appid'])) # print(data, type(data))