Browse Source

ADD:添加头条回调接口

cxyu 3 năm trước cách đây
mục cha
commit
f4d6722189
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      handlers/ApiHandler.py

+ 9 - 0
handlers/ApiHandler.py

@@ -17,6 +17,15 @@ class YgApiHandler(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):
         print('今日头条',self.request.body.decode(encoding='utf-8'))
         print(self.get_args())