Пример #1
0
def last_build(game_id):
    """Retrieves the timestamp of the last update to the public branch in steam"""
    sc = SteamClient()
    sc.anonymous_login()
    info = sc.get_product_info(apps=[game_id])
    fact = info['apps'][game_id]['depots']['branches']
    last_updated = int(fact['public']['timeupdated'])
    last_dt = datetime.datetime.fromtimestamp(last_updated)
    return last_dt
Пример #2
0
def connect_to_steam():
    client = SteamClient()

    while True:
        result = client.anonymous_login()

        if result == EResult.OK:
            break
        else:
            print('{} Error while logging, retrying in 10 seconds...'.format(
                Consts.LOG_PREFIX))
            time.sleep(10)

    return client