checkUpdatesHandler.py 文件源码

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

项目:lets 作者: osuripple 项目源码 文件源码
def asyncGet(self):
        try:
            args = {}
            #if "stream" in self.request.arguments:
            #   args["stream"] = self.get_argument("stream")
            #if "action" in self.request.arguments:
            #   args["action"] = self.get_argument("action")
            #if "time" in self.request.arguments:
            #   args["time"] = self.get_argument("time")

            # Pass all arguments otherwise it doesn't work
            for key, _ in self.request.arguments.items():
                args[key] = self.get_argument(key)

            if args["action"].lower() == "put":
                self.write("nope")
                return

            response = requests.get("https://osu.ppy.sh/web/check-updates.php?{}".format(urlencode(args)))
            self.write(response.text)
        except Exception as e:
            log.error("check-updates failed: {}".format(e))
            self.write("")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号