Notices


Reply
Thread Tools
Posts: 19 | Thanked: 17 times | Joined on Mar 2010
#21
Current status: I'm having a bit of trouble persuading Sony's servers to give me the info to parse. I'm working on it still, but it's quite slow progress. I've made a temporary page to put some code up, so if anyone has some time to play around with it, they can: http://www.pebble.org.uk/projects/trophyapp - but if you're not a python hacker, this is likely to just show you 'Network error 203', so don't get too excited
 

The Following 2 Users Say Thank You to marble For This Useful Post:
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#22
Originally Posted by marble View Post
Current status: I'm having a bit of trouble persuading Sony's servers to give me the info to parse. I'm working on it still, but it's quite slow progress. I've made a temporary page to put some code up, so if anyone has some time to play around with it, they can: http://www.pebble.org.uk/projects/trophyapp - but if you're not a python hacker, this is likely to just show you 'Network error 203', so don't get too excited
I've looked at your code and then decided to play around with the PSN websites. Here's what I've come up with: A parser for the public trophy list, so you can get a list of games (name, icon, progress in percent, and total and separate trophy counts). Here's the script, you need BeautifulSoup for it: http://thpinfo.com/2010/archive/trophies.py

You can use it like this:

Code:
python trophies.py marblepebble
The parser already returns a generator with separate "Game" objects that contain the metadata, pre-parsed and easy to use.

What this approach can't do is list separate trophies, as this is only allowed when the user is logged in. I'm using a tricky request at the beginning to get hold of a JSESSIONID cookie, which seems to be the key to let the server give me the data (otherwise it won't work) - maybe this is something that you need to do as well to get your code working?
 

The Following 2 Users Say Thank You to thp For This Useful Post:
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#23
Oh, and I just found some open source code in Java that might come in handy: http://code.google.com/p/psnfriends/
 
mr_xzibit's Avatar
Posts: 220 | Thanked: 49 times | Joined on Aug 2010 @ england
#24
keep up the hard work guys. something i would be happy to test great stuff


__________________
Fav band.SyLOSiS
Playstation® 3 n900 Trophy viewer click here
want a more responsive n900? Click here
 
Posts: 19 | Thanked: 17 times | Joined on Mar 2010
#25
Originally Posted by thp View Post
What this approach can't do is list separate trophies, as this is only allowed when the user is logged in. I'm using a tricky request at the beginning to get hold of a JSESSIONID cookie, which seems to be the key to let the server give me the data (otherwise it won't work) - maybe this is something that you need to do as well to get your code working?
Yeah. I got a JSESSIONID cookie (from the login form), and a bunch of others too. It's just that when I compare a capture of my code's requests with HttpFox's capture of me doing the same thing in firefox, the other cookies are all different. I think somewhere in all their huge amounts of javascript they must be manipulating them somehow. Either that, or the cookies change on images, which I was filtering out...
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#26
Originally Posted by marble View Post
Yeah. I got a JSESSIONID cookie (from the login form), and a bunch of others too. It's just that when I compare a capture of my code's requests with HttpFox's capture of me doing the same thing in firefox, the other cookies are all different. I think somewhere in all their huge amounts of javascript they must be manipulating them somehow. Either that, or the cookies change on images, which I was filtering out...
Use Wireshark to capture the HTTP traffic and then filter on "http.request" and "Follow TCP Stream" to see the "real" conversation between clients and the server - it's easier to compare that way IMHO (although it won't work for HTTPS for obvious reasons)
 
Posts: 19 | Thanked: 17 times | Joined on Mar 2010
#27
I have stuff working now for grabbing the games list from the eu server, and I have code to parse the per-game trophy lists from there too. I'll get the code up online this evening (I hope, tomorrow evening if not).
 
mr_xzibit's Avatar
Posts: 220 | Thanked: 49 times | Joined on Aug 2010 @ england
#28
any progress on this one guys? im oober excited about this one!!
__________________
Fav band.SyLOSiS
Playstation® 3 n900 Trophy viewer click here
want a more responsive n900? Click here
 

The Following User Says Thank You to mr_xzibit For This Useful Post:
Posts: 19 | Thanked: 17 times | Joined on Mar 2010
#29
Just uploaded a new version that does a bit more than the old one did. It's still not very exciting for a non-developer, but it's closer... Assuming you don't have weird characters in your email address/password, it should dump a list of games you've got trophies in on the console. It also has the capability to fetch the individual lists for each game, but that's not hooked up yet - that shouldn't be hard though.
 

The Following User Says Thank You to marble For This Useful Post:
mr_xzibit's Avatar
Posts: 220 | Thanked: 49 times | Joined on Aug 2010 @ england
#30
how something along the lines of a trophy card(to show recent trophies/gamer level etc. as a widget kinda like the face book app
__________________
Fav band.SyLOSiS
Playstation® 3 n900 Trophy viewer click here
want a more responsive n900? Click here
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:09.