#NEWLINE# def _get_access_token( self , request_token ) : #NEWLINE# #INDENT# 'Retrieve the access token if OAuth hybrid was used' #NEWLINE# oauth = OAuth1 ( self . oauth_key , client_secret = self . oauth_secret , resource_owner_key = request_token ) #NEWLINE# resp = requests . post ( GOOGLE_OAUTH , auth = oauth ) #NEWLINE# if ( resp . status_code != 200 ) : #NEWLINE# #INDENT# log . error ( 'OAuth token validation failed. Status: %d, Content: %s' , resp . status_code , resp . content ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# access_token = dict ( parse_qsl ( resp . text ) ) #NEWLINE# return { #NEWLINE# #INDENT# 'oauthAccessToken' : access_token [ 'oauth_token' ] , #NEWLINE# 'oauthAccessTokenSecret' : access_token [ 'oauth_token_secret' ] , #NEWLINE# #UNINDENT# }