What happens when you get bored making your math homework? You write simple algorithms to occupy your mind. No, I don’t have ADHD.
While browsing YouTube I came across this video which made me want to make a version for myself. And I did it.
(low quality for the upload to work)
-
- the root -
- un-scanned node -
- the node encountered an error -
- scanned node -
- End-Of-Line node, page has no more accessible URLs
Download for them curious people
Note:
I recommend not publishing this since Roblox can flag it as breaking the “No redirecting users off-platform” rule. If you do publish it some mention of me would be appreciated :))
Mapping The Internet.rbxl (62.1 KB)
Lazy to download, curious to know how?
It’s just one click of a button. BUUUT:
local function ExtractLinks(URL)
local Success,Content = pcall(function()
return HttpService:GetAsync(URL)
end)
if Success then
local ExtractedLinks = {}
for Link in Content:gmatch('href="(.-)"') do
if Link:find("http://") or Link:find("https://") then
table.insert(ExtractedLinks,Link)
end
end
return ExtractedLinks
else
return ("%s"):format(Content)
end
end
Yeah. That simple. Who would’ve thought?
It is important to filter out any result that doesn’t contain “https://” or “http://” since it can happen.
Credits to the original creator for making this idea, I just coded it worse in a different engine.