@D55RUS

Как решить мою проблему с SteamClient?

Помогите решить проблему!! Что не так я делаю? Вроде все правильно:
import requests
import json
from time import sleep
from threading import Thread
from steampy.client import SteamClient

api = '**********'
# Set steam API key
api_key = '***************'
# Set path to SteamGuard file
steamguard_path = 'C:/pytest/maFiles/aoaoaoaoao.maFile'
# Steam username
username = '**************'
# Steam password
password = '*******************'

offers = requests.get(
    f'http://api.steampowered.com/IEconService/GetTradeOffers/v1/?key={api_key}&get_sent_offers=1&time_historical_cutoff=1').json()[
    'response']['trade_offers_sent']
for offer in offers[:1]:
    offer_id = offer['tradeofferid']
    message = offer['message']
    account_other_id = offer['accountid_other']
    state = offer['trade_offer_state']
    if int(state) == 9:
        print('Предложение с айди ' + str(offer_id) + ' было отклонено!')
    if int(state) == 6:
        print('Подтвердите предложение с айди ' + str(offer_id) + ' на моб. устройстве!')
        steam_client = SteamClient(api_key)
        steam_client.login(username, password, steamguard_path)
        steam_client._confirm_transaction(str(offer_id))
    if int(state) == 3:
        print('Предложение с айди ' + str(
            offer_id) + ' было успешно совершено! Все предметы были обменены!')
    if int(state) == 1:
        print('Предложение с айди ' + str(
            offer_id) + ' является недействительным. Т.е его срок истек(не путать с 9 положением)')

Кидает такую ошибку: 5eb6be2067fc9634610860.png
  • Вопрос задан
  • 348 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы