#NEWLINE# def _debug_cookie( self , request , spider ) : #NEWLINE# #INDENT# if self . debug : #NEWLINE# #INDENT# cl = [ to_native_str ( c , errors = 'replace' ) for c in request . headers . getlist ( 'Cookie' ) ] #NEWLINE# if cl : #NEWLINE# #INDENT# cookies = '\n' . join ( ( 'Cookie: {}\n' . format ( c ) for c in cl ) ) #NEWLINE# msg = 'Sending cookies to: {}\n{}' . format ( request , cookies ) #NEWLINE# logger . debug ( msg , extra = { #NEWLINE# #INDENT# 'spider' : spider , #NEWLINE# #UNINDENT# } )