Heya grant.... ive been implementing that AIM bot with your MySpace module, and ive put in a few things that i needed, and they seem like they would be a great addition to the myspace module itself.
One thing i have is just a get_top_8() function. Easily enough it just uses get_page and get_friends_on_page to get the top 8 off the users homepage. But there was always those two 'cool new profiles' that show up, so what i did was just do an index() of the page-content to get the info of where the string 'My Friend Space' occured, which is where it starts listing your top 8.
Also, there is no immediate way to tell if you used a correct username and password when initiating the myspace class. This wouldnt be a problem if you would be using one account for all your stuff, but my bot lets people register with their myspace accounts, so i needed a way to tell if they had logged in correctly or not. I made a quick workaround that simply checks to see if i can get $myspace-my_friend_id or not. If we get a number bigger than 0, the it was a successfull login, if not, then for some reason my_friend_id equals 'L' (haha, dont know what thats all about, but hey), then that means we got a bad login name or password.
So yeah.... it would be cool if when initiating the class, it could return an error code, or set a variable, or halt, or something like that :)
myspace_stats() is another one thats pretty handy. I let people call this function by sending the phrase -stats to my bot, and on doing so, the bot logs in and reads the homepage and looks for these constants:
(2)
]
