[Python] Steam: How to get manifest gid for older game versions

Discussão em 'Python' iniciado por Stack, Dezembro 7, 2024.

  1. Stack

    Stack Membro Participativo

    I’m trying to get the Manifest GID for a specific BuildID, not just the latest version, which I'm able to find:

    from steam.client import SteamClient
    from steam.guard import generate_twofactor_code_for_time
    import base64, time

    def get_depot_manifests(app_id, depot_id):
    try:
    client = SteamClient()
    client.login(
    username="username",
    password="password",
    two_factor_code=generate_twofactor_code_for_time(
    base64.b64decode("shared_secret"),
    int(time.time())
    )
    )

    app_info = client.get_product_info(apps=[app_id])
    depot_info = app_info['apps'][app_id]['depots'].get(str(depot_id), {})

    manifests = []
    if gid := depot_info['manifests'].get('public', {}).get('gid'):
    manifests.append(('public', gid))

    for build_id, build in depot_info['manifests'].get('builds', {}).items():
    if gid := build.get('gid'):
    manifests.append((build_id, gid))

    return manifests
    except:
    return None

    manifests = get_depot_manifests(730, 2347770) # Counter-Strike 2
    if manifests:
    for build_id, gid in manifests:
    print(f"Build: {build_id}, GID: {gid}")


    Does anyone know how to retrieve the GID for an older version of a game? Ideally, I’d like to do this using the ValvePython steam library (https://github.com/ValvePython/steam), but I’m open to any method.

    Another possible way for me is the method SteamDB is using. I’ve noticed that SteamDB lists manifestids for older builds, such as https://steamdb.info/depot/2347770/manifests/. Does anyone know how SteamDB fetches these?

    Continue reading...

Compartilhe esta Página