#NEWLINE# @ classmethod #NEWLINE# def from_response( cls , response , formname = None , formid = None , formnumber = 0 , formdata = None , clickdata = None , dont_click = False , formxpath = None , formcss = None , **kwargs ) : #NEWLINE# #INDENT# kwargs . setdefault ( 'encoding' , response . encoding ) #NEWLINE# if ( formcss is not None ) : #NEWLINE# #INDENT# from parsel.csstranslator import HTMLTranslator #NEWLINE# formxpath = HTMLTranslator ( ) . css_to_xpath ( formcss ) #NEWLINE# #UNINDENT# form = _get_form ( response , formname , formid , formnumber , formxpath ) #NEWLINE# formdata = _get_inputs ( form , formdata , dont_click , clickdata , response ) #NEWLINE# url = _get_form_url ( form , kwargs . pop ( 'url' , None ) ) #NEWLINE# method = kwargs . pop ( 'method' , form . method ) #NEWLINE# return cls ( url = url , method = method , formdata = formdata , ** kwargs )