Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

bot_factory.py 302B

12345678910111213141516
  1. """
  2. channel factory
  3. """
  4. from bot.baidu.baidu_unit_bot import BaiduUnitBot
  5. def create_bot(bot_type):
  6. """
  7. create a channel instance
  8. :param channel_type: channel type code
  9. :return: channel instance
  10. """
  11. if bot_type == 'baidu':
  12. return BaiduUnitBot()
  13. raise RuntimeError