def urlopen():
 t = Twitter(auth=authen())
 try:
  if (not g['stuff'].isdigit()):
   return
  tid = c['tweet_dict'][int(g['stuff'])]
  tweet = t.statuses.show(id=tid)
  urls = tweet['entities']['urls']
  if (not urls):
   printNicely(light_magenta('No url here @.@!'))
   return
  else:
   for url in urls:
    expanded_url = url['expanded_url']
    webbrowser.open(expanded_url)
 except:
  debug_option()
  printNicely(red("Sorry I can't open url in this tweet."))

def urlopen ( ) : t = Twitter ( auth = authen ( ) ) try : if ( not g [ 'stuff' ] . isdigit ( ) ) : return tid = c [ 'tweet_dict' ] [ int ( g [ 'stuff' ] ) ] tweet = t . statuses . show ( id = tid ) urls = tweet [ 'entities' ] [ 'urls' ] if ( not urls ) : printNicely ( light_magenta ( 'No url here @.@!' ) ) return else : for url in urls : expanded_url = url [ 'expanded_url' ] webbrowser . open ( expanded_url ) except : debug_option ( ) printNicely ( red ( "Sorry I can't open url in this tweet." ) )
wrapper to urllib2 .