def auth_sub_string_from_body(http_body):
 for response_line in http_body.splitlines():
  if response_line.startswith('Token='):
   return response_line[6:]
 return None

def auth_sub_string_from_body ( http_body ) : for response_line in http_body . splitlines ( ) : if response_line . startswith ( 'Token=' ) : return response_line [ 6 : ] return None
extracts the authsub token from an http body string .