Recently, I was attempting to get an limited’s Recent Average Price, however, it seems Roblox no longer loads the limited page fully because it doesn’t load the Recent Average Price area to a bot.
I’m just trying to have my website pull these Recent Average Price / RAP values when requested and I’m looking for a workaround. The catalog API doesn’t provide me specific asset RAP values
You can use inspect element to grab the name of whatever you’re looking for on the page and then use that module to grab the element in Lua. To use HTTP directed at Roblox.com from in game, you can use a proxy such as this one, or set up your own if you know how to do that.
If what you’re trying to do is from a server/bot you have running, and not from Roblox itself, you can just use the native js functions discussed in that module to grab elements from a page to accomplish the same thing (unless you’re not using JavaScript; then you’re going to have to Google the best ways to work with HTML with the language you’re using).
Basically, you’re having your code read the website as a human would, just in a more annoying-to-script fashion.
It looks to me that when you open an item’s page, it has a split second of loading for the RAP. It looks like it first sends you the page, then the client is requesting more info from the server to load the page dynamically. This probably saves a bit of loading time for the client as it appears the page has loaded.
What this means for us is that the page loads, THEN the RAP loads on the page. So, the initial GET request won’t return the RAP.
So, you can look through the HTTP Requests in Inspect Element to see what requests your browser made to Roblox to populate the page you needed. And it took me a minute, but after searching through the requests that my browser made, I found the link Roblox uses to get RAP:
If you’re using PHP, you can use PHP’s native HTTP functionality to grab the data directly from the URL. That link leads to some good information on how to grab data using PHP.
If you’re using Roblox, you can use HTTPService:JSONDecode() on the information you grab from the URL. To make a request directly to the Roblox website, you can use a proxy such as this one.
Well, since you’re using PHP, you can use PHP’s native HTTP functionality to grab the data directly from the URL. That link leads to some good information on how to grab data using PHP.