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

How to get a players profile description?

Asked by 7 years ago

Is there a way to get a players profile description from the roblox website?

0
There used to be, but i think it is unusable now. TinyScripter 70 — 7y

1 answer

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
7 years ago

There's no ROBLOX api for it, so you'd need to scrape the site. Since I've already written something like this before, here's an example in python.

#!/usr/bin/python

import sys
from termcolor import colored
from urllib2 import urlopen
from bs4 import BeautifulSoup as bs

userid = raw_input("User id: ")

if len(userid) > 0 and userid.isdigit(): 
    url = "https://www.roblox.com/users/{0}".format(userid)
    url = urlopen(url).read()

    if len(url) != 0:
        soup = bs(url, 'lxml')
        match = soup.find("span", {"class": "profile-about-content-text linkify"})
        print(match.text)
else:
    print colored("User-id invalid", 'red')

--[[
>
Welcome to the Roblox profile! This is where you can check out the newest items in the catalog, and get a jumpstart on exploring and building on our Imagination Platform. If you want news on updates to the Roblox platform, or great new experiences to play with friends, check out blog.roblox.com. Please note, this is an automated account. If you need to reach Roblox for any customer service needs find help at www.roblox.com/help
--]]


Ad

Answer this question