Log in

No account? Create an account
Client server API without a password - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Client server API without a password [Feb. 21st, 2004|12:29 pm]
LiveJournal Client Discussions


[mood |quixoticquixotic]
[music |Phorever People-The Shamen-Boss Drum]

It occurred to me this morning that it would be amusing to quickly scan all my friends and pull up the music they've been listening to lately. The "obvious" way to do this is to parse the HTML on my friends page and pull the Music field. But that's brittle, and parsing HTML is generally not fun. So I thought I'd just use the client-server API (I've used the flat API in the past to make backups and build a text index of my journal).

This would work fine, if all I cared about were the music I've been listening to lately, since I know my password. But I want to scan other people's journals. However, it looks like I can't without sending a password. Is there any way to grab this kind of data? It doesn't seem to be in the RSS feed.

Since I'm not interested in accessing private data, I wonder why the API requires a password. Perhaps it's to prevent people from building scanners like this? ;-)

From: evan
2004-02-21 05:25 pm (UTC)
you'd have to call getevents on each of your friends. that's expensive.
(Reply) (Thread)
[User Picture]From: sui66iy
2004-02-21 08:15 pm (UTC)


True, though simplicity of code is more important to me than speed of execution for this application. However, it seems to be a moot point, because I can't call getevents on a friend of mine unless I know the friend's password. Or am I mistaken?

(Or are you trying to say that it's expensive for the server, and hence not supported unless the password is known?)
(Reply) (Parent) (Thread)
From: evan
2004-02-21 08:22 pm (UTC)


Expensive on the server, yeah. But I don't think that was the reason. (Many users would be upset to discover a clietn could pull all of their public entries, even though it'd be just as simple to download a bunch of webpages and clients can do that right now. But many users don't really understand what's going on.)

A simpler way to do it would be to make a custom journal style that puts out your friends page in XML. (You can find them on google somewhere.) Then you can literally just read the metadata off of your friends page.
(Reply) (Parent) (Thread)
[User Picture]From: sprote
2004-02-22 09:35 pm (UTC)


Journalert does it by fetching your friends page using a custom journal style that generates XML. Then you just run it through an off-the-shelf parser. The only drawback is that only paid accounts are allowed to specify custom styles when fetching pages. Oh, also, it was a bit tricky to get and send the right LJ login cookie to be able to access friends-only posts...
(Reply) (Parent) (Thread)