loading

Instructable Playercard API?

Is there anyway to embed your instructable playercard onto your personal website/blog?

sort by: active | newest | oldest
1-10 of 35Next »
builderkidj5 years ago
Playercard?
(Disappearing comment bug strikes - second attempt)

Click on anybody's username, and look to the top-left: user stats are presented in Top Trump format.

You can still buy a set of real cards as well if you look at step four here.

https://www.instructables.com/id/Instructables-Top-Trumps/


heh, that happened to me on your latest fourm.
I saw what you look like in real life and thanks for the advice/tip


J

My real name is Jordan,Don't ya know
I'm 11
Like Nacho said - it's all there, so really all you would need to do is scrape the data off the page and display it. Google Is Your Friend as far as the specific PHP, but it shouldn't be hard: Grab only the data you want from the page, and display that (presumably as HTML) on the webpage.

...Hm. I'm looking more at the source, and now I'm not so sure that's true. The info in the card isn't anywhere to be found in it (unless I'm sorely mistaken), and I can't see it embedded as an image. I'm not so sure how it's generated or where the actual data is stored, now.

>thinks aloud< Maybe they query the database every so often and just generate ALL the images once a month or something, and they stay the same all month? Surely not. Also, why can't one find the image if that's the case? This is interesting (at least to me; if someone sees I'm missing something incredibly simple please do call me on it :P ). I'll have to watch my card and see how often it updates...

They use CSS to handle the formatting (as Nacho has very nicely demonstrated).

If you scan through the page source of your profile page (the one other users see, not /you/), you can pick off the URL from the JavaScript for the card display:

https://www.instructables.com/member/statscard/?screenName=kelseymh

If you access that URL directly (plug in whatever username you want), you'll see that it shows up in a relatively unformatted way; it's the CSS that makes it all pretty.

But you could easily script up something to parse the raw HTML to capture things like number of I'bles or whatever.

Now, why is this comment only showing up now?

(...oh, I see the bad word now...sigh...)

Yes indeed, I just blew past it in the source (I expected all the stats to actually be IN the source, which in retrospect is a silly assumption).
> (...oh, I see the bad word now...sigh...)
.  "parse"?
. Go to tim_n's Member page and search for

<div class="statscard round-corners shadow" id="tim_n">

at the beginning of the data and

</div>

at the end


tim_n
Date Joined:Jan 5, 2007
  • Instructables26
  • Total Views265,680
  • Featured %65%
  • Subscribers50
  • Topics12
  • Comments197
WHITESPACE!!!!!!!!!!!!!!!!!!!!1

1-10 of 35Next »