浏览代码

ADD:添加头条回调接口

cxyu 3 年之前
父节点
当前提交
f4d6722189
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      handlers/ApiHandler.py

+ 9 - 0
handlers/ApiHandler.py

@@ -17,6 +17,15 @@ class YgApiHandler(BaseHandler):
 
 
 class TtApiHandler(BaseHandler):
 class TtApiHandler(BaseHandler):
 
 
+    def get(self):
+        print('今日头条',self.request.body.decode(encoding='utf-8'))
+        print(self.get_args())
+        path=self.get_args()["path"]
+        task_id=self.get_args()["taskId"]
+        print(path)
+        # MysqlUtils().quchen_text.execute(f"update yangguang_path set path='{path}' where task_id='{task_id}'")
+        self.write(json.dumps({"code":200,"msg":"ok"}))
+
     def post(self):
     def post(self):
         print('今日头条',self.request.body.decode(encoding='utf-8'))
         print('今日头条',self.request.body.decode(encoding='utf-8'))
         print(self.get_args())
         print(self.get_args())