Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I return the ratings of a place?

Asked by
yoshi8080 445 Moderation Voter
6 years ago
Edited 6 years ago

Lets say I wanted to return the amount of thumbs up/downs as seen here

Which is 1 M+ likes and 196k+ Dislikes

I'm aware that a proxy would be used to determine this, however I'm just sure what to do next.

Given this code from the developer's forum to determine the total amount of people playing the game.

function players_online(place_id)
    local web = game.HttpService:GetAsync("https://www.rprxy.xyz/games/"..place_id)
    local player_text = string.find(web,"Playing") -- find the online players section
    local new = string.sub(web,player_text)

    local number_start = string.find(new,">") -- find where the number starts
    new = string.sub(new,number_start)

    local number_end = string.find(new,"<") -- find where the number ends
    new = string.sub(new,2,number_end-1)

    local players_online = string.gsub(new,",","") -- in case it's over 1000 players
    return tonumber(players_online)
end

I would appreciate any help on doing to guide me on doing so.

Answer this question