def import_entries(self, items):
self.write_out(self.style.STEP('<STR_LIT>'))<EOL>for item_node in items:<EOL><INDENT>title = (item_node.find('<STR_LIT:title>').text or '<STR_LIT>')[:<NUM_LIT:255>]<EOL>post_type = item_node.find('<STR_LIT>' % WP_NS).text<EOL>content = item_node.find(<EOL>'<STR_LIT>').text<EOL>if post_type == '<STR_LIT>' and content and title:<EOL><INDENT>self.write_out('<STR_LIT>' % title)<EOL>entry, created = self.import_entry(title, content, item_node)<EOL>if created:<EOL><INDENT>self.write_out(self.style.ITEM('<STR_LIT>'))<EOL>image_id = self.find_image_id(<EOL>item_node.findall('<STR_LIT>' % WP_NS))<EOL>if image_id:<EOL><INDENT>self.import_image(entry, items, image_id)<EOL><DEDENT>self.import_comments(entry, item_node.findall(<EOL>'<STR_LIT>' % WP_NS))<EOL><DEDENT>else:<EOL><INDENT>self.write_out(self.style.NOTICE(<EOL>'<STR_LIT>'))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.write_out('<STR_LIT>' % title, <NUM_LIT:2>)<EOL>self.write_out(self.style.NOTICE('<STR_LIT>'), <NUM_LIT:2>)<EOL><DEDENT><DEDENT>
Loops over items and find entry to import,
an entry need to have 'post_type' set to 'post' and
have content.