Yahoo Pipes newbie needs help with Regex in useful Twitter pipe

Discussion in 'Programming' started by slobizman, May 25, 2009.

  1. #1
    The following public Yahoo pipe (not writen by me) has the description: "Using the supplied Twitter rss feed, filters out the username and any tweets with #tags and @replies. If the tweet contains a url, then this is used as the item link, rather than the default twitter one." It's great for using in a blog sidebar.

    http://pipes.yahoo.com/hendy/twitter

    It works great, most of the time. But sometimes, instead of ending up with the Twitter title and no link, it ends up with just the link. The links are at the end of the Tweet, in traditional fashion, and the ones that it chokes on were not using all 140 chars, in case you might be thinking that. I can find no common pattern of those that do not work right.

    I'm not very good at regex, so could someone look a the pipe's source and tell me if there is something wrong with the regex that's there (or something else)?

    These are all ones that if choked on, just returning the URL, hyperlinked, instead of the title, hyperlinked, with no URL:

    Fears Grow over Catastrophe of U.S. Losing Triple-A Credit Rating http://is.gd/CR9g

    Dick Cheney slams NY Times for helping Al Qaeda http://is.gd/CmEi This is one tough Dick

    ihatethemediaClimate Depot Banned in Louisiana http://is.gd/BwXw

    Iran blocks Facebook ahead of presidential election http://is.gd/CJSb
     
    slobizman, May 25, 2009 IP