#NEWLINE# def _process_oauth_response( self , response ) : #NEWLINE# #INDENT# 'Extracts the fields from an oauth response' #NEWLINE# if ( response . status_code == 200 ) : #NEWLINE# #INDENT# credentials = parse_qs ( response . text ) #NEWLINE# self . _init_oauth ( credentials . get ( 'oauth_token' ) [ 0 ] , credentials . get ( 'oauth_token_secret' ) [ 0 ] ) #NEWLINE# self . oauth_session_handle = credentials . get ( 'oauth_session_handle' , [ None ] ) [ 0 ] #NEWLINE# oauth_expires_in = credentials . get ( 'oauth_expires_in' , [ OAUTH_EXPIRY_SECONDS ] ) [ 0 ] #NEWLINE# oauth_authorisation_expires_in = credentials . get ( 'oauth_authorization_expires_in' , [ OAUTH_EXPIRY_SECONDS ] ) [ 0 ] #NEWLINE# self . oauth_expires_at = ( datetime . datetime . now ( ) + datetime . timedelta ( seconds = int ( oauth_expires_in ) ) ) #NEWLINE# self . oauth_authorization_expires_at = ( datetime . datetime . now ( ) + datetime . timedelta ( seconds = int ( oauth_authorisation_expires_in ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _handle_error_response ( response )