bot.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Tadam_bot 作者: maxlagerz 项目源码 文件源码
def index(self):
        if "content-length" in cherrypy.request.headers and \
            "content-type" in cherrypy.request.headers and  \
            cherrypy.request.headers["content-type"] == "application/json":

            length = int(cherrypy.request.headers["content-length"])
            json_string = cherrypy.request.body.read(length).decode("utf-8")
            update = telebot.types.Update.de_json(json_string)
            bot.process_new_updates([update])
            return ''
        else:
            raise cherrypy.HTTPError(403)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号