EDIT: Fixed it, had to use % to make magic characters non-magic characters for most parts, some that I didn't know of and needed an extra pair of eyes to find. This is my final function:
local fetchShoutCreator = function(group) return game:GetService'HttpService':GetAsync(string.format('http://roproxy.tk/Groups/group.aspx?gid=%d',group)):match'<a id="ctl00_cphRoblox_GroupStatusPane_StatusPoster" href="%.%./User%.aspx%?id=[0-9]-" style="font%-style%: italic;">(.-)</a>' end
Hi guys, I am trying to use HTTPService to find the creator of a group shout in a group and I'm having trouble trying to do this.
I found some code which returned the shout of the group which you can see below. It uses string.match to return the value between the HTTP span tags
using the .-
string pattern, which only returns a portion of a text.
local fetchShout = function(group) return game:GetService'HttpService':GetAsync(string.format('http://roproxy.tk/Groups/group.aspx?gid=%d',group)):match'<span id="ctl00_cphRoblox_GroupStatusPane_StatusTextField" class="StatusTextField linkify">(.-)</span>' end
Now when I try and edit this to work with getting the creator of the group status, it always returns nil and doesn't match anything.
local fetchShoutCreator = function(group) return game:GetService'HttpService':GetAsync(string.format('http://roproxy.tk/Groups/group.aspx?gid=%d',group)):match'<a id="ctl00_cphRoblox_GroupStatusPane_StatusPoster" href="%.%./User%.aspx?id=[0-9]-" style="font%-style%: italic%;">(.-)</a>' end
I did a bit of research and so far, I have not found anything that I can use to solve my problem.
So, I'm wondering how I could edit the above function so that it will return the group shout creator. The other function above that one returns the group shout perfectly but my custom function doesn't and instead returns nil.
I'm sorry if I'm being too vague and will try to add more information if requested.
Any help is appreciated, thank you!