Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buy_item can't start #396

Open
laifodes opened this issue Jul 6, 2024 · 4 comments
Open

buy_item can't start #396

laifodes opened this issue Jul 6, 2024 · 4 comments

Comments

@laifodes
Copy link

laifodes commented Jul 6, 2024

photo_2024-07-06_13-49-50
Screenshot_243421
Screenshot_22233

The item is on the market, but you can’t buy it.

from steampy.client import SteamClient
from steampy.models import Currency, GameOptions
import json

with open('account_info.txt', 'r') as acc:
login, password, api_key, steam_id, shared_secret, identity_secret = acc.read().split(',')

steam_client = SteamClient(api_key=api_key)

steam_guard JSON

steam_guard_data = json.dumps({
"steamid": steam_id,
"shared_secret": shared_secret,
"identity_secret": identity_secret
})

with SteamClient(api_key, login, password, steam_guard_data) as client:
print(steam_client.is_session_alive())
response = client.market.buy_item('R8 Revolver | Bone Mask (Well-Worn)', '4911820044455752514', 93, 12,
GameOptions.CS, Currency.RUB)

print(response)
 File "D:\Programming\Python\steamautobuy\testbuy3.py", line 17, in <module>
   with SteamClient(api_key, login, password, steam_guard_data) as client:
 File "D:\Programming\Python\steamautobuy\Lib\site-packages\steampy\client.py", line 126, in __enter__
   self.login(self.username, self._password, self.steam_guard_string)
 File "D:\Programming\Python\steamautobuy\Lib\site-packages\steampy\client.py", line 110, in login
   LoginExecutor(self.username, self._password, self.steam_guard['shared_secret'], self._session).login()
 File "D:\Programming\Python\steamautobuy\Lib\site-packages\steampy\login.py", line 38, in login
   self._update_steam_guard(login_response)
 File "D:\Programming\Python\steamautobuy\Lib\site-packages\steampy\login.py", line 117, in _update_steam_guard
   client_id = login_response.json()['response']['client_id']
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'client_id'```

  
@Aarab228
Copy link

Aarab228 commented Jul 6, 2024

забанило айпи из-за частых запросов (я забыл за них и только что свой тоже забанил :) )

@p-arbuzov
Copy link

Коллеги, кто шарит сколько по новым ограничениям можно запросов сейчас делать?

@Aarab228
Copy link

Aarab228 commented Jul 7, 2024

Коллеги, кто шарит сколько по новым ограничениям можно запросов сейчас делать?

опять новые ограничения ввели? Раньше не более 20 запросов в минуту было (1 запрос раз в ~4 секунды)

@p-arbuzov
Copy link

Коллеги, кто шарит сколько по новым ограничениям можно запросов сейчас делать?

опять новые ограничения ввели? Раньше не более 20 запросов в минуту было (1 запрос раз в ~4 секунды)

Да, как будто где-то месяц назад или меньше все стали чаще 429 код ответа ловить за слишком частые запросы.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants