Instructable Playercard API?
35
comments
|
Add Comment
|
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.
http://www.instructables.com/id/Instructables-Top-Trumps/
J
My real name is Jordan,Don't ya know
I'm 11
...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:
http://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.
(...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).
<div class="statscard round-corners shadow" id="tim_n">
at the beginning of the data and
</div>
at the end
- Instructables26
- Total Views265,680
- Featured %65%
- Subscribers50
- Topics12
- Comments197
Will
Be
Covered
So I'll be
Brief:
Cool!
Guess I
didn't
look
hard
enough.
:)
I can't remember the link and I'm not at my pc, it's in the best answers script I wrote nacho though if you have or can get that.
And, if you used that code on another site, wouldn't the card cover stuff there?
V
- Instructables500
- Total Views1,000,000
- Featured %110%
- SubscribersAll Members
- Topics200
- Comments50,000
_______________________________________________________ ___
_______________________________________________________ _____
_______________________________________________________ _______
_________________________________________________________ _______________________________________________________ _______
_________________________________________________________ __________________________________________ ___
__________________________________________________ _____ _____
_______________________________________________________ _______
_________________________________________________________ _________________________________________________________ _____
________________________________________________________ ___________________________________________ ___
_______________________________________________________ _____
_______________________________________________________ _______
_________________________________________________________ _____________________________________________________________
http://www.instructables.com/id/Embed-your-Playercard/
http://www.instructables.com/id/Embed-your-Playercard/
Please leave any comments/suggestions/bugs there please
Or you can go direct here:
http://playercard.neobard.net/
I have a coding friend over today, I'll ask him to have a looksie! (might make a nice wordpress plugin?)
I bet there are quite a few people who like to be able to do the same thing.
![]() |




















Vancouver Mini Maker Faire 2012
Rebuilding NordicTrack ski machine drive rollers
Looking for New Zealand-based Instructables authors for conference on August 27 in Wellington
Call to makers - Brighton Mini Maker Faire
Milk Crates - not as green as you think
TEDxBaghdad - Iraq - violence, dust storms and open sourced manufacturing
UK Mini Maker Faire - The Derby Silk Mill - New Poster to Share!







