def fbappabout(self, arg): """go to the about page for an app given a canvas name, app id, or api key""" if is_int(arg): return "http://www.facebook.com/apps/application.php?id=%s" % quote_plus( arg) else: try: # check to see if this is a valid API key if len(arg) == 32: int(arg, 16) return "http://www.facebook.com/apps/application.php?api_key=%s" % quote_plus( arg) except ValueError: pass return "http://www.facebook.com/app_about.php?app_name=%s" % quote_plus( arg)
def ya(self, arg): """searches Yahoo! Answers for an answer to your question""" if arg: return "http://answers.yahoo.com/search/search_result?p=%s" % quote_plus( arg) else: return "http://answers.yahoo.com/"
def fb(self, arg): """search www.facebook.com or go there""" if arg: return "http://www.facebook.com/s.php?q=%s&init=q" % quote_plus( arg) else: return "http://www.facebook.com/"
def wikinvest(self, arg): """Searches Wikinvest or goes there""" if arg: return "http://www.wikinvest.com/Special/Search?search=%s" % quote_plus( arg) else: return "http://www.wikinvest.com/"
def yt(self, arg): """Searches YouTube or goes to it""" if arg: return "http://www.youtube.com/results?search_query=%s&search_type=&aq=-1&oq=" % quote_plus( arg) else: return "http://www.youtube.com/"
def aim(self, arg): """use AOL Instant Messenger to IM a given screenname""" return "aim:goim?screenname=%s" % quote_plus(arg)
def fbpbz(self, arg): """goes to Facebook Platform Bugzilla bugs""" if arg: return "http://bugs.developers.facebook.com/buglist.cgi?quicksearch=%s" % quote_plus( arg) else: # if no arg, go to the main page of bugzilla return "http://bugs.developers.facebook.com/"
def wa(self, arg): """Searches Wolfram Alpha or goes there""" if arg: return "http://www.wolframalpha.com/input/?i=%s" % quote_plus(arg) else: return "http://www.wolframalpha.com/"
def ytd(self, arg): """Searches YouTube by date added instead of by relevance, or goes to youtube.com""" if arg: return "http://www.youtube.com/results?search_query=%s&search_sort=video_date_uploaded" % quote_plus( arg) else: return "http://www.youtube.com/"