Generic profile body.
Smart quote placeholder
Trade and interact with steam market, webapi, guard.
Home Page: https://aiosteampy.somespecial.one/
License: MIT License
If you have none listed items, Rendered listings response will return:
{'success': True, 'pagesize': 100, 'total_count': 0, 'assets': [], 'start': 0, 'num_active_listings': 0, 'listings': [], 'listings_on_hold': [], 'listings_to_confirm': [], 'buy_orders': [...]'
Where we can see that assets list is empty.
Later on in _parse_item_descriptions_for_listings method we use assets list (which is empty) and trying to call method 'items':
def _parse_item_descriptions_for_listings(
cls: Type["SteamCommunityMixin"],
assets: dict[str, dict[str, dict[str, dict]]],
item_descrs_map: dict[str, dict],
):
for app_id, app_data in assets.items():
for context_id, context_data in app_data.items():
for a_data in context_data.values():
key = create_ident_code(a_data["classid"], app_id)
if key not in item_descrs_map:
item_descrs_map[key] = cls._create_item_description_kwargs(a_data, [a_data])
I just roughly looked around code and made this small fix by adding if operator (highlighted in the code). I didn't analyze how code works in deep.
def _parse_item_descriptions_for_listings(
cls: Type["SteamCommunityMixin"],
assets: dict[str, dict[str, dict[str, dict]]],
item_descrs_map: dict[str, dict],
):
if assets: # < -- BUY ADDING THIS LINE
for app_id, app_data in assets.items():
for context_id, context_data in app_data.items():
for a_data in context_data.values():
key = create_ident_code(a_data["classid"], app_id)
if key not in item_descrs_map:
item_descrs_map[key] = cls._create_item_description_kwargs(a_data, [a_data])
- Windows
- Python
- aiosteampy==0.5.4
No response
I was testing this library, after initial login tests I couldn't log into my account.
Default login function wasn't working for me. This was error I got:
I was using the default login function from this library. Only after I changed code to this one, I logged successfully:
async def login(self: "SteamCommunityMixin", *, init_data=True, init_session=True):
"""
Perform login.
Populate `api_key`, `trade_token`, `wallet_country`, `wallet_currency` fields if it is required.
:param init_data: fetch initial required data (api key, trade token, wallet_currency/wallet_country)
:param init_session: init session before start auth process.
Set this to False if you already make requests to steam from current client.
:raises ApiError: when failed to obtain rsa key, update steam guard code
:raises LoginError: other login process errors
"""
# https://github.com/bukson/steampy/blob/fe0433c8cf7020318cfbbc22e79028a7576374ee/steampy/login.py#L67
# https://github.com/DoctorMcKay/node-steam-session/blob/698469cdbad3e555dda10c81f580f1ee3960156f/examples/login-to-web-with-2fa.ts#L13
init_session and await self.session.get(STEAM_URL.COMMUNITY)
session_data = await self._begin_auth_session_with_credentials()
await self._update_auth_session_with_steam_guard_code(session_data)
await self._poll_auth_session_status(session_data)
fin_data = await self._finalize_login() # there can be retrieved steam id
# https://github.com/DoctorMcKay/node-steam-session/blob/64463d7468c1c860afb80164b8c5831e629f657f/src/LoginSession.ts#L845
transfers = [asyncio.create_task(self._perform_transfer(d, fin_data["steamID"])) for d in
fin_data["transfer_info"]]
done, _ = await asyncio.wait(transfers, return_when=asyncio.FIRST_COMPLETED)
# Transfers exception check ?
self._set_web_cookies(done.pop().result())
init_data and await self._init_data()
self._is_logged = True
The only change is
transfers = [asyncio.create_task(self._perform_transfer(d, fin_data["steamID"])) for d in
fin_data["transfer_info"]]
But I don't really know is it good or not
Windows
Python
No response
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://steamcommunity.com/tradeoffer/new/send')
code:
inv = await client.get_inventory(Game.CSGO)
partner_steam_id = xxxxxx
offer_id = await client.make_trade_offer(partner_steam_id, [inv[0]], [], 'Hi, lets change our items!')
Hello, I have a few questions, can you answer me in an email please?
@somespecialone
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.