SteamUs1 Posted 14 hours ago Report Posted 14 hours ago I am currently trying to get some Steam Market listings in my program, but am running into the following problem: When I send the request to this Webpage "https://steamcommunity.com/market/listings/730/AK-47 | Asiimov (Field-Tested)" with this example code: import axios from "axios"; const url = "https://steamcommunity.com/market/listings/730/AK-47%20%7C%20Asiimov%20%28Field-Tested%29"; import axios from "axios"; axios.get(url, { headers }) .then(response => { console.log("Response:", response.data); }) .catch(error => { console.error("Error:", error); }); I get an HTML page from which I can extract the data in a Variable. However, when I use javascript, only general information is displayed, but not the converted price, which is important for me, because otherwise the items are in any currency. In the code I am also logged in with SteamUser in the same account with which I receive the covered price as a variable via the browser. Do you Guys know, what i need to change, to also get the converted Price? Quote
SteamUs1 Posted 14 hours ago Author Report Posted 14 hours ago (edited) I have found out the difference: For example, in my code the page I get has no wallet info: g_rgWalletInfo[\'wallet_currency\'] while the web browser has one: var g_rgWalletInfo = { "wallet_currency": 3, "wallet_country": "NL" ... } Does anyone know why steam thinks I don't have a wallet or why the Request with the SteamUser Cookies is so diffrent? Edited 14 hours ago by SteamUs1 Quote
SteamUs1 Posted 13 hours ago Author Report Posted 13 hours ago (edited) Have found it! Somehow, i was not logged in, so steam was sending me the normal Page, as if would browse on the steammarket without session information. Make sure, that everything in the cookies is setup correctly! Edit: Make sure, that you include the params for "webTradeEligibility"!! Edited 13 hours ago by SteamUs1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.