#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# super ( UserAgentMiddleware , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# regex_str = '|' . join ( settings . USER_AGENTS ) #NEWLINE# regex_str = ( '.*?(%s)' % regex_str ) #NEWLINE# self . USER_AGENT_REGEX = re . compile ( regex_str , re . IGNORECASE )