5ThirtyOne

Derek Punsalan

Media Temple

Create a MySpace comments RSS feed

MySpace comments RSS

Update #2: This tutorial is no longer supported at this time. Feel free to explore the possibility of extracting comments on your own time – or wait until a suitable replacement is found.

Update #1: MySpace made some back-end changes rendering the previous tutorial invalid. Current extraction rules should now work for extracting MySpace comments to a suitable format for feeding through an RSS reader. Thanks to Max for pointing out the small bloat in the filter code.

MySpace continues to stand at the top as far as social networks are concerned. Until the service begins to embrace some of the modern conveniences of the net – namely RSS and content syndication – users will be forced to continue manual page refreshes. Although my account is not receiving the same attention it once did, I felt it would be rude not to share the following for MySpace users seeking an RSS alternative for accessing comments.

For the following tutorial, I decided to use the Feed43 (free) service to filter through MySpace crud in order to create a shiny new feed to toss into a desktop or web based feed reader. Before attempting the following tutorial, please do your own homework regarding Really Simple Syndication (RSS).

Follow the steps below and you’ll be one step closer to minimizing the amount of time you spend logging into MySpace.

  • Create a free account at Feed43.com
  • Make note of your unique friend ID
  • Login to your Feed43 account and select ‘Create new feed’. Under Step 1, enter the following URL. Replace __FriendID__ with your own unique ID.

    http://myspace.com/index.cfm?fuseaction=user.homeComments&friendID=__FriendID__

    Select ‘Reload’. Feed43 then returns the Source Code for your main profile. If no source code is returned, double check your ID. Your comments, the ones we want to extract, are somewhere in that mess of code called MyMess MySpace. Now let’s move on to extraction rules.

  • Part 2. Defining the search pattern is the challenging part of the tutorial. Seeing as though I have already gone through and created a working feed for my account, I’ve alleviated that oh so stressful burden. What we’re doing here is specifying what parts of the source code Feed43 should filter and transform into a working RSS feed. Here are the following ‘Extraction’ rules:

    Global Search Pattern:

    {%}

    Item (repeatable) Search Pattern:

    <th>{%}<br />{*}
    <h4>{%}</h4>{*}
    {%}<br /><br />{*}

  • Once you’ve entered the necessary extraction rules, click ‘Extract’. Feed43 utilizes the specified rules above and kindly displays the ‘Clipping Data’.
  • Continue to Step 3 to define the output format. I’ve conveniently formatted published feeds to display in the following manner:

    MySpace username + URL
    Comment Date
    Comment Text

    The ‘Feed Title’ & ‘Link’ should already be filled. Feel free to edit as needed. Make sure to add a relevant description. Maybe something along the lines of “MySpace is my life and there is nothing beyond the front door unless I have a constant Internet connection to MySpace”. Continue on to the ‘RSS Item Properties’ and copy the following:

    Item Title Template:

    {%2}

    Item Link Template:

    {%1}

    Item Content Template:

    {%3}

    Alternatively, you can choose to combine all three fields into one. I advise against this if you want to keep some sense of organization to individual posts. Click ‘Preview’ and Feed43 will display the finished results.

  • If you’re content with the results, scroll to the bottom of the page and grab your fresh Feed43 powered MySpace comment feed (XML).

The tutorial is a great example of the power that Feed43 offers. Feel free to edit the structure of published content to better suit your needs.

On a side note: With the above tutorial, you can create multiple RSS feeds to keep track of your friends comments as well as complete strangers (if that’s your kinda thing). [Digg].

Backblaze unlimited secure online backups Find out what Backblaze can do for your online backups

75 Comments • RSS

  1. Derek says:

    MySpace serves JavaScript. MySpace user are not able to embed JS into their profile. Does that answer the question?

  2. Justin says:

    Alright thanks, so in other words, Myspace shouldn’t have a problem with in then, right?

  3. Mike says:

    I’m having a problem with this. appearently myspace has made you have to long in now to view a users comments. if you could help me get this to work with the profile page that would be awesome

  4. Jeremy says:

    MySpace now requires a logged-in session to ‘View All Comments’, using a log-in token. Unfortunately, the token changes each time you sign in, so I’m pretty sure you can’t just use any token you’ve copied from any log-in (though, I haven’t tried…).
    However, you can still view anybody’s main Profile page, logged in or not. You can also pull the comments from it using Feed43. Of course, you won’t get ALL the comments, but that really isn’t a problem, since Feed43 only allows a maximum 20 items to be pulled from a source (pay accounts on Feed43 allow 50), which is less than you’ll see on a standard profile anyway. Plus, you can be sure they’ll always be the latest comments.

    The search routines are going to be different than those above, as well.

    First, point your new Feed to the URL of your profile (or the profile of whoever’s comments you want to read, if you’re really scary).

    EXAMPLE: http://www.myspace.com/Need_A_Life

    Where Need_A_Life is either the address you set in MySpace or your FriendID number (or your friend’s, or enemy’s, scary person). Click “Reload”.

    Now, it’s time to set your search parameters. Here’s the ones I use – I’ve only tested this with my page, so you may need to play with them a bit. Also, they aren’t the prettiest results. I’ll explain in a bit.

    Global:
    Add Comment{%}

    Item (repeatable):
    {%}{*}
    {%}{*}
    {%}{*}

    These search params work most of the time, but break if you’ve got an “Add Comment” link somewhere else on your page (like a custom Comment form in an overlay), or if someone has posted a table in one of there comments. You can fix the first one by changing the text a bit (make it say something like “Add a Comment”), and the second one by deleting the offending comment (or disallowing HTML in your comments altogether).

    This returns four variable marker thingies, defined as follows (don’t copy/paste this anywhere, it’s just for reference)

    {%1} – URL to Friend
    {%2} – User Name of Friend
    {%3} – Date Posted
    {%4} – Comment ( preceeded by a BR tag )

    Notice how the Comment section is preceeded by a BR tag? Well, I couldn’t figure out a way around it. I decided to use it to my advantage, though. My layout template looks like this:

    Title:{%2}
    Link:{%1}
    Content:{%3}{%4}

    The {%4} tag starts with a line break, so the date and actual comment are seperated by a carriage return. Messiness used to your advantage.

    Like I said, I did this quick and dirty, so it’s not made for compatibility. I suggest you play around with different search parameters, and get creative. Feed43 is a great service, and well-worth learning to use it.

  5. Jeremy says:

    From above, the following got a little messed up:
    [quote comment="13072"]
    Global:
    Add Comment{%}

    Item (repeatable):
    {%}{*}
    {%}{*}
    {%}{*}

    [/quote]

    This should read:

    Global:
    Add Comment{%}

    Item (repeating):
    {%}{*}
    {%}{*}
    {%}{*}

    Teaches me to post before reading the directions….
    Oh, and pay attention to the line-breaking in the Item section. Both {%}’s and {*}’s need to be on the same line (Feed43 looks for *exact* matches, line-breaks and everything.

  6. Mike says:

    still doesn’t work for me, im getting 0 matches

  7. Mike says:

    I came up with this search pattern…it kind of works…if only I could get rid of that img tag

    <a href="{*}" rel="nofollow">{%}</a>{*}

  8. Mike says:

    I didn’t put that rel in there

  9. Derek says:

    Funny. Seems as though WordPress prefers to include that rel tag. I tried to delete it a few times for you.

  10. Mike says:

    well thanks for trying derek

  11. Mike says:

    right now I’m just working on getting the commentors name, but I can’t seem to get rid of there user pic since it is in a similar link tag as their name. I’m real bad at this search pattern thing.

  12. Mike says:

    okay derek I’m getting pissed…its leaving out my code even though I put it in that code syntax

  13. Derek says:

    [quote comment="13093"]okay derek I’m getting pissed…its leaving out my code even though I put it in that code syntax[/quote]

    Sorry about that, sometimes the plugins are a bit screwy. If you need to share add spaces between characters and leave a note saying to remove them (if not needed).

  14. Mike says:

    here I’ll try what you said

    {%}{*}
    {%}{*}
    {%}{*}

    I put a crap load of spaces in their, now figure out where they are and delete them

  15. Mike says:

    nope just got rid of my code even with the spaces

  16. Mike says:

    well I got mine working, check out the link

  17. Evan says:

    Ugh, I still can’t get this to work, even attempting to follow Mike’s progress. Is there any chance there’s a resolution to this Derek?

  18. Jeremy says:

    [quote comment="13085"]still doesn’t work for me, im getting 0 matches[/quote]
    Of course not!
    I’m running into the same posting problem, so I gave up and just made a text file with the searches I used.
    Remember, this search pattern only works from your main MySpace profile page, i.e. “http://www.myspace.com/_friendID_” where _friendID_ is either your ID number or your profile name – the one that you permanently set.

    Here’s the file:
    http://www.edgemontpark.net/feed43info.txt

  19. Jeremy says:

    PS – If you’re using Internet Explorer or another web browser that automatically tries to read and intrepret the file, either save it or ‘View->Source’; it’s plain text, so it gets a little ugly when it’s parsed as HTML.

  20. Shawn says:

    When will myspace formally have RSS ?

Leave a Reply

Comments may be held for moderation. If your comment does not appear immediately, do not repost. I reserve the right to remove any inappropriate or off-topic comments. If you plan on sharing helpful code, please pass it through Postable first. Want other to know who you are? Register a Gravatar.

Anti-Spam Protection by WP-SpamFree

Syndicate

Subscribe via RSS or Email

Advertisements

9rules network

5THIRTYONE

Public projects

Select project

Something new

Fresh content

Show Latest

Google, the noun that became a verbGoogle. Openly embracing and sharing your info with the online giant... Or trying your best to keep your data hidden from Vader? After you watch the clip, check out this infographic of ... Link