1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] How am I exceeding steam api's rate limit?

Discussão em 'Python' iniciado por Stack, Setembro 28, 2024 às 11:22.

  1. Stack

    Stack Membro Participativo

    I want to get a steam user's CSGO inventory with this steam API and it works fine for the first 5-6 call. After that I get the error code 429, but I don't understand how I exceed the rate limit with this low amount of requests. I found this on steam: "You are limited to one hundred thousand (100,000) calls to the Steam Web API per day.", but I clearly did not make more than 100.000 calls.

    import requests
    import json

    steamIDs = [
    76561198323251063, # Enyém
    76561199013264816 # Rolié
    ]

    gameID = "730"

    def jprint(obj):
    text = json.dumps(obj, sort_keys=True, indent=4)
    return text

    response = requests.get(f"http://steamcommunity.com/inventory/{steamIDs[1]}/{gameID}/2")
    print(response.status_code)

    with open("data.txt", "w") as f:
    f.write(jprint(response.json()))

    Continue reading...

Compartilhe esta Página