import requests import json class Tag: @classmethod def video_tag(cls, pq_id: str, tag: str): try: url = "https://admin.piaoquantv.com/manager/video/tag/addVideoTags" payload = json.dumps({ "videoId": pq_id, "tagNames": tag }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) response = response.json() code = response['code'] return code except: return 1