-- --httprequests turned on.
local http = game:GetService'HttpService';
local url = 'https://www.twitter.com/Roblox';
local x = require(workspace["HTML Module"]);
local data = http:GetAsync(url);
if data~=nil then
local requestedClass = 'TweetTextSize TweetTextSize--normal js-tweet-text tweet-text' --html class of a tweet, found with inspect element
local tweets = x:getElementsByClassName(data, requestedClass, 3)--third parameter is 3, because I don't want my table to be longer than 3 rows.
for i,v in pairs(tweets) do
print(i..': '..v);
end
end
So much more trouble to have to recode this to check for errors. Please use the </> option when posting and just add the actual code not a picture of it.
Try this β¦
function contains(wc, c)
for i = 1, #wc - #c + 1 do
local n = i + #c - 1
if wc:sub(i, n) == c then
if wc:sub(n + 1, n + 1) == ' ' or wc:sub(n + 1, n + 1) == ' ' then
if wc:sub(i - 1, i - 1) == ' ' or wc:sub(i - 1, i - 1) == ' ' then
return true
end
end
end
end
return false
end
And now I see why you used a picture β¦ lol make sure the β 's are set up as you wish. Think that would also be a nil for ββ β¦ possibly check for string length would be an alternative.