import pymongo
from bson import ObjectId

handler = pymongo.MongoClient().qa_system.answer
answer = [{'_id': ObjectId('5ead1083896e60e26dcc67b4'),
           'answer': '毫无疑问，必定为2',
           'answer_time': '2018-07-23 12:18:11',
           'author': '王小一',
           'question_id': ObjectId('5ead107ed1174b0308255c35'),
           'vote_down': 200,
           'vote_up': 10},
          {'_id': ObjectId('5ead1083896e60e26dcc67b5'),
           'answer': '楼上的，自问自答有意思吗？',
           'answer_time': '2018-07-23 12:18:11',
           'author': '钱小九',
           'question_id': ObjectId('5ead107ed1174b0308255c35'),
           'vote_down': 20,
           'vote_up': 100},
          {'_id': ObjectId('5ead1083896e60e26dcc67b6'),
           'answer': '在某些情况下可能等于三。题主应该补充必要信息。',
           'answer_time': '2018-07-23 12:18:11',
           'author': '孙小十',
           'question_id': ObjectId('5ead107ed1174b0308255c35'),
           'vote_down': 100,
           'vote_up': 0},
          {'_id': ObjectId('5ead1083896e60e26dcc67b7'),
           'answer': '这是我写的诗，下一句是：愿逐月华流照君。诗名为：《春江花月夜》',
           'answer_time': '2018-07-23 12:18:11',
           'author': '张若虚',
           'question_id': ObjectId('5ead107ed1174b0308255c38'),
           'vote_down': 0,
           'vote_up': 1000},
          {'_id': ObjectId('5ead1083896e60e26dcc67b8'),
           'answer': '这是阿西莫夫的《银河系漫游指南》里面的',
           'answer_time': '2018-07-23 12:18:11',
           'author': '阿东莫夫',
           'question_id': ObjectId('5ead107ed1174b0308255c36'),
           'vote_down': 21,
           'vote_up': 20},
          {'_id': ObjectId('5ead1083896e60e26dcc67b9'),
           'answer': '楼上的别乱说啊，《银河系漫游指南》是英国作家道格拉斯·亚当斯写的。',
           'answer_time': '2018-07-23 12:18:11',
           'author': '道格拉斯',
           'question_id': ObjectId('5ead107ed1174b0308255c36'),
           'vote_down': 10,
           'vote_up': 60},
          {'_id': ObjectId('5ead1083896e60e26dcc67ba'),
           'answer': '是英国作家道格拉斯·亚当斯写的《银河系漫游指南》里面的原话。原因是42在ASCII码中对应了*号，而*号在通配符中代表一切',
           'answer_time': '2018-07-23 12:18:11',
           'author': '张起灵',
           'question_id': ObjectId('5ead107ed1174b0308255c36'),
           'vote_down': 1,
           'vote_up': 200},
          {'_id': ObjectId('5ead1083896e60e26dcc67bb'),
           'answer': '楼主，这不是去幼儿园的车！我只说作者是兰陵笑笑生，至于书名嘛，哈哈哈哈哈。',
           'answer_time': '2018-07-23 12:18:11',
           'author': '老司机',
           'question_id': ObjectId('5ead107ed1174b0308255c3b'),
           'vote_down': 100,
           'vote_up': 0},
          {'_id': ObjectId('5ead1083896e60e26dcc67bc'),
           'answer': '警察叔叔，这里有人在飙车。我认为兰陵笑笑生应该说王世贞。至于书名嘛，哈哈哈哈哈。',
           'answer_time': '2018-07-23 12:18:11',
           'author': '小文青',
           'question_id': ObjectId('5ead107ed1174b0308255c3b'),
           'vote_down': 0,
           'vote_up': 30},
          {'_id': ObjectId('5ead1083896e60e26dcc67bd'),
           'answer': '《明朝那些事儿》里面讲了的，你去看看。',
           'answer_time': '2018-07-23 12:18:11',
           'author': '欧阳掏粪',
           'question_id': ObjectId('5ead107ed1174b0308255c3b'),
           'vote_down': 3,
           'vote_up': 40}]


handler.insert_many(answer)