def _process_items(items, user_conf, error_protocol):
def process_meta(item, error_protocol):<EOL><INDENT>try:<EOL><INDENT>return item._parse()<EOL><DEDENT>except Exception as e:<EOL><INDENT>error_protocol.append(<EOL>"<STR_LIT>" % (item._get_filenames()[<NUM_LIT:0>], e.message)<EOL>)<EOL>if isinstance(item, DataPair):<EOL><INDENT>return item.ebook_file<EOL><DEDENT><DEDENT><DEDENT>out = []<EOL>for item in items:<EOL><INDENT>if isinstance(item, EbookFile):<EOL><INDENT>out.append(item)<EOL><DEDENT>else:<EOL><INDENT>out.append(process_meta(item, error_protocol))<EOL><DEDENT><DEDENT>out = [x for x in out if x]  <EOL>fn_pool = []<EOL>soon_removed = out if conf_merger(user_conf, "<STR_LIT>") else items<EOL>for item in soon_removed:<EOL><INDENT>fn_pool.extend(item._get_filenames())<EOL><DEDENT>_remove_files(fn_pool)<EOL>return out<EOL>
Parse metadata. Remove processed and sucessfully parsed items.

Returns sucessfully processed items.