I want to achieve a system that prints catalogue results in the output, to then put in a module, however Roblox does not allow access to http service, and it prints "HttpService is not allowed to access ROBLOX resources "
Does anyone know how to do this properly, maybe use a proxy?
I tried various methods, however none seem to work.
local Http = game:GetService("HttpService")
local subcategory = 9
--local url = "rprxy.deta.dev/search/catalog/json?Subcategory=" .. subcategory .. "&IncludeNotForSale=true&ResultsPerPage=60&PageNumber="
--local url ="RoProxy.com//search/catalog/json?Subcategory=" .. subcategory .. "&IncludeNotForSale=false&ResultsPerPage=60&PageNumber="
local url = "https://catalog.Roblox.com/v1/search/items/details?Category=0&Subcategory=9"
local pages = 25
local assets = {}
for i = 1, pages do
local urlPage = url .. i
print(urlPage)
local data = Http:JSONEncode(Http:GetAsync(urlPage))
data = Http:JSONDecode(data)
for ii = 1, #data do
local asset = data[ii]
local id = asset.AssetId
local name = asset.Name
assets[#assets + 1] = "{Id = " ..id .. ", Name = \"" .. name .. "\"}"
end
print(i)
end
local source = "return { \n\t" .. table.concat(assets, ",\n\t") .. "\n}"
local module = Instance.new("ModuleScript")
module.Source = source
module.Parent = workspace