<s> import json <EOL> import codecs <EOL> class JsonPipeline ( object ) : <EOL> def __init__ ( self ) : <EOL> self . file = codecs . open ( '<STR_LIT>' , '<STR_LIT:wb>' , encoding = '<STR_LIT:utf-8>' ) <EOL> def process_item ( self , item , spider ) : <EOL> line = json . dumps ( dict ( item ) ) + "<STR_LIT:\n>" <EOL> print line <EOL> self . file . write ( line . decode ( '<STR_LIT>' ) ) <EOL> return item <EOL> class MysqlPipeline ( object ) : <EOL> def process_item ( self , item , spider ) : <EOL> return item <EOL> class MongoPipeline ( object ) : <EOL> def process_item ( self , item , spider ) : <EOL> return item </s>
