def oauth_token_info_from_body(http_body):
 token = None
 token_secret = None
 for pair in http_body.split('&'):
  if pair.startswith('oauth_token='):
   token = urllib.unquote(pair[len('oauth_token='):])
  if pair.startswith('oauth_token_secret='):
   token_secret = urllib.unquote(pair[len('oauth_token_secret='):])
 return (token, token_secret)

def oauth_token_info_from_body ( http_body ) : token = None token_secret = None for pair in http_body . split ( '&' ) : if pair . startswith ( 'oauth_token=' ) : token = urllib . unquote ( pair [ len ( 'oauth_token=' ) : ] ) if pair . startswith ( 'oauth_token_secret=' ) : token_secret = urllib . unquote ( pair [ len ( 'oauth_token_secret=' ) : ] ) return ( token , token_secret )
exracts an oauth request token from the servers response .