It pulls the data properly, but the next page is registered as nil, so it’s not updating the URL.
Code:
local Http = game:GetService("HttpService")
local url = "https://catalog.roproxy.com/v1/search/items/details?Category=13&PageNumber="
local pages = 25
local assets = {}
for i = 1, pages do
local urlPage = url
local data = Http:JSONEncode(Http:GetAsync(urlPage))
data = Http:JSONDecode(data)
print(data)
local nextPageCursor = data.nextPageCursor
print(data.NextPageCursor)
if nextPageCursor ~= nil then --page detected, go for it
url = url..nextPageCursor
print(url)
end
wait(2)
end
This print below is related to line print(data.NextPageCursor):
local Http = game:GetService("HttpService")
local url = "https://catalog.roproxy.com/v1/search/items/details?Category=13&PageNumber="
local pages = 25
local assets = {}
for i = 1, pages do
local urlPage = url
local data = Http:JSONEncode(Http:GetAsync(urlPage))
data = Http:JSONDecode(data)
print(data)
local nextPageCursor = data.nextPageCursor
if nextPageCursor ~= nil then --page detected, go for it
print(data.NextPageCursor) -- Put the check here since its not NIL
url = url..nextPageCursor
print(url)
end
wait(2)
end