TipJar

  • Facebook

    ESP Visions Posted by Pyrohacker on March 18, 2010


    Okay, this one’s for browsing Facebook. There are still a few problems, but it’s working well for the most part. The main roadblock was that the News Feed page works differently than viewing a single friend’s Wall.

    News Feed:
    Stories are selected with *.GenericStory
    Story times (which are the only links to the actual story itself) are selected with *.GenericStory_Time

    Friend’s Wall:
    Stories are selected with *.UIStory (which can also work on the News Feed, strangely)
    Story times are selected with *.UIIntentionalStory_Time

    Both:
    You can throw in the ‘Older Posts’ link at the bottom with *a:contains("Older Posts"), allowing you to move to – duh – older stories.

    In Conclusion:

    If you don’t care about the story times, then a good choice is an ESP Vision for just the stories:

    div.GenericStory, div.UIStory, a:contains("Older Posts")

    If you do want to select the story times, I would recommend 2 different scrapers:
    1. ?story : *.GenericStory, .UIIntentionalStory, a:contains("Older")
    2. ?time : *.GenericStory_Time, .UIIntentionalStory_Time, a:contains("Older")

    Wow, that’s a lot of jQuery! Anyway, I hope somebody can make good use of these. Good luck!

     

Comments

  • Dan Jones 9:13 am on March 18, 2010 | #

    Two thoughts I had.
    *.GenericStory is the same as .GenericStory
    So, I would replace your scrapers with:
    1. ?story : .GenericStory, .UIIntentionalStory, a:contains(“Older”)
    2. ?time : .GenericStory_Time, .UIIntentionalStory_Time, a:contains(“Older”)

    That works just fine.
    When you open GleeBox and type in “*.GenericStory, .UIIntentionalStory, a:contains(“Older”)” the * is not part of the query, and therefore, needn’t be included in the scraper definition.

    The second thought is just a semantic matter.
    None of what you’ve written as actually jQuery. All you’ve written is what some people wrongly refer to as jQuery selectors, which is nothing more than a subset of CSS3 selectors.
    In other words, you didn’t write jQuery, you wrote CSS selectors.

  • Ankit 9:10 pm on March 18, 2010 | #

    I prefer not highlighting the entire post but rather just the user images. Here is what I use for facebook:

    ESP Vision: .GenericStory_Pic, a.PagerMoreLink, a:contains(Top News), a:contains(Most Recent), #profile_minifeed>div>a>.UIProfileImage

    Scrapers:

    ?fbc – Highlights the online friends
    fbc : li.buddy_row.uiListItem>a,a.friends_online_sidebar_navigation_link.see_all_link

    ?fbn – Highlights notifications icon
    fbn : div#notificationsWrapper

    And now the ?time scraper. What do you think? :)

    @Dan You’re right that most of them are CSS3 selectors. But we refer to it as jQuery selectors (in gleeBox as well) because I’m pretty sure some selectors that jQuery provides are not in CSS3.

  • Ankit 9:13 pm on March 18, 2010 | #

    The long selectors because I used the !inspect command

Leave a Comment

You'll need to login to post a comment. It's easy, you can use your Facebook, Twitter, Google or OpenID credentials.