woctezuma / steam-market

Find arbitrages on the Steam Market.
MIT License
161 stars 18 forks source link

Somehow your Steam ID is in the code #30

Closed henrydatei closed 1 year ago

henrydatei commented 1 year ago

I ran the command in #29 again and this time the program finished with

Inventory for profile 76561198028705366 could not be loaded. Status code 403 was returned.

I looked the steam id up and it belongs to https://steamcommunity.com/id/wokuma (I guess it's your steam account). Have I somewhere missed a file to edit and fill in my own steam id?

woctezuma commented 1 year ago

The SteamID is hard-coded at the following line. You could edit it manually. https://github.com/woctezuma/steam-market/blob/1935d6e3a3add63eea2edacd28e7fd6855e661c6/inventory_utils.py#L21-L24


That being said, I realize I should have fed the SteamID as an argument to the function load_steam_inventory() when called at: https://github.com/woctezuma/steam-market/blob/1935d6e3a3add63eea2edacd28e7fd6855e661c6/inventory_utils.py#L365

which would require to add the SteamID as an argument of:

https://github.com/woctezuma/steam-market/blob/1935d6e3a3add63eea2edacd28e7fd6855e661c6/inventory_utils.py#L358-L362

The simplest fix for now is to edit the hard-coded value. 😅

woctezuma commented 1 year ago

Following #31, one should be able to set the SteamID in main():

https://github.com/woctezuma/steam-market/blob/4e286e00f415cda864c96f01b258500c06d1b686/market_arbitrage.py#L509