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

Having problems getting a player's forum posts with HTTP Service?

Asked by
Scriptecx 124
9 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

So I'm trying to get the number of players forum posts with Http Service using a proxy, and it's getting the place visits instead of the forum posts. This is because it's the exact same line of code in inspect element. Is there a way to get around this? All help and criticism is appreciated.

This is just something I was trying but it keeps printing nil. Excuse the bad code:

get = game.HttpService:GetAsync('http://www.rproxy.pw/users/66672488/profile')

print (get:match ('<li class="profile-stat"><p class="stat-title">Forum Posts</p><p class="rbx-lead">(%d+)</p>'))
0
Wouldn't the html code have one different factor? Like instead the value being "value=placevistis", it would be "value=forumposts"? TheDeadlyPanther 2460 — 9y
0
No this is the only way of getting the forum posts I know of, and its the same as getting the place visits. <p class="rbx-lead">num</p> Scriptecx 124 — 9y
0
You need to include your code so we can guess what's wrong. BlueTaslem 18071 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I believe you're only accessing one line, try doing the full thing:

<li class="profile-stat">

<p class="stat-title">Forum Posts</p>

<p class="rbx-lead">%d+</p>

</li>

That should work.

0
I tried that, but it just prints nil. Scriptecx 124 — 9y
0
Really? Try adding spaces in between etc. I'll re format so you can try it that way (because I basically de-formatted the code i got from the browser) TheDeadlyPanther 2460 — 9y
0
I have tried it. Still prints nil. Scriptecx 124 — 9y
0
Damn. TheDeadlyPanther 2460 — 9y
Ad

Answer this question