Files
dt_audio/feishu_uploader.ipynb
alsesa b10fd0e112 merge
2024-10-14 17:39:25 +08:00

245 lines
23 KiB
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "d67ee4f8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Block 0: 4194304\n",
"Block 1: 4194304\n",
"Block 2: 4194304\n",
"Block 3: 836012\n",
"{'code': 0, 'message': 'Success', 'data': {'file_token': 'Iby8btwdjobxowxOOJGcl8GtnXn', 'version': '7292285803852611612', 'data_version': '7292285803852611612'}}\n",
"{'code': 0, 'msg': 'success', 'data': '[]'}\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'topic': '8093', 'duration': 1677340, 'expire_time': -1, 'in_trash': False, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 4, 'transcript_progress': {'current': '0.72', 'rate': '0.72'}, 'scheduler_type': 0}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.01%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'expire_time': -1, 'in_trash': False, 'scheduler_execute_delta_time': -1, 'object_status': 4, 'topic': '8093', 'transcript_progress': {'current': '2.86', 'rate': '0.72'}, 'scheduler_type': 0, 'object_token': 'obcnae9145x56f52e2aj5761', 'duration': 1677340}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.03%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}, 'status': [{'duration': 1677340, 'expire_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 4, 'topic': '8093', 'transcript_progress': {'current': '5.72', 'rate': '0.72'}, 'in_trash': False, 'scheduler_type': 0, 'scheduler_execute_delta_time': -1}]}}\n",
"转写中...0.06%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'duration': 1677340, 'scheduler_execute_delta_time': -1, 'transcript_progress': {'current': '7.87', 'rate': '0.72'}, 'expire_time': -1, 'in_trash': False, 'scheduler_type': 0, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 4, 'topic': '8093'}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.08%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'duration': 1677340, 'in_trash': False, 'scheduler_type': 0, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'transcript_progress': {'current': '10.73', 'rate': '0.72'}, 'expire_time': -1, 'scheduler_execute_delta_time': -1, 'object_status': 4}], 'ws_config': {'heartbeat_interval': 20, 'http_interval': 60, 'ws_enable': False}}}\n",
"转写中...0.11%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'topic': '8093', 'transcript_progress': {'rate': '0.72', 'current': '13.59'}, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 4, 'in_trash': False, 'scheduler_type': 0, 'duration': 1677340, 'expire_time': -1}], 'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}}}\n",
"转写中...0.14%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'transcript_progress': {'current': '15.74', 'rate': '0.72'}, 'expire_time': -1, 'scheduler_execute_delta_time': -1, 'object_status': 4, 'duration': 1677340, 'in_trash': False, 'scheduler_type': 0}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.16%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'expire_time': -1, 'in_trash': False, 'scheduler_type': 0, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 4, 'topic': '8093', 'duration': 1677340, 'transcript_progress': {'current': '18.6', 'rate': '0.72'}, 'scheduler_execute_delta_time': -1}], 'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}}}\n",
"转写中...0.19%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 4, 'topic': '8093', 'duration': 1677340, 'scheduler_execute_delta_time': -1, 'transcript_progress': {'rate': '0.72', 'current': '20.75'}, 'expire_time': -1, 'in_trash': False, 'scheduler_type': 0}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.21%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'transcript_progress': {'current': '23.61', 'rate': '0.72'}, 'expire_time': -1, 'scheduler_type': 0, 'scheduler_execute_delta_time': -1, 'object_status': 4, 'topic': '8093', 'duration': 1677340, 'in_trash': False}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.24%\n",
"{'data': {'status': [{'duration': 1677340, 'expire_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1, 'topic': '8093', 'scheduler_execute_delta_time': -1, 'transcript_progress': {'current': '25.76', 'rate': '0.72'}, 'in_trash': False, 'scheduler_type': 0}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}, 'code': 0, 'msg': 'success'}\n",
"转写中...0.26%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_status': 1, 'topic': '8093', 'expire_time': -1, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'duration': 1677340, 'transcript_progress': {'current': '28.62', 'rate': '0.72'}, 'in_trash': False, 'scheduler_type': 0}], 'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}}}\n",
"转写中...0.29%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'transcript_progress': {'current': '31.48', 'rate': '0.72'}, 'expire_time': -1, 'in_trash': False, 'scheduler_type': 0, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1, 'scheduler_execute_delta_time': -1, 'topic': '8093', 'duration': 1677340}], 'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}}}\n",
"转写中...0.31%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'in_trash': False, 'scheduler_type': 0, 'object_status': 1, 'duration': 1677340, 'transcript_progress': {'current': '33.62', 'rate': '0.72'}, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'expire_time': -1}], 'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}}}\n",
"转写中...0.34%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}, 'status': [{'topic': '8093', 'duration': 1677340, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1, 'in_trash': False, 'scheduler_type': 0, 'transcript_progress': {'current': '36.49', 'rate': '0.72'}, 'expire_time': -1}]}}\n",
"转写中...0.36%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_status': 1, 'topic': '8093', 'in_trash': False, 'scheduler_type': 0, 'object_token': 'obcnae9145x56f52e2aj5761', 'duration': 1677340, 'transcript_progress': {'current': '38.63', 'rate': '0.72'}, 'expire_time': -1, 'scheduler_execute_delta_time': -1}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.39%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}, 'status': [{'object_status': 1, 'duration': 1677340, 'expire_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'transcript_progress': {'current': '41.49', 'rate': '0.72'}, 'in_trash': False, 'scheduler_type': 0, 'scheduler_execute_delta_time': -1}]}}\n",
"转写中...0.41%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}, 'status': [{'expire_time': -1, 'scheduler_type': 0, 'topic': '8093', 'duration': 1677340, 'transcript_progress': {'current': '43.64', 'rate': '0.72'}, 'in_trash': False, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1}]}}\n",
"转写中...0.44%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}, 'status': [{'duration': 1677340, 'expire_time': -1, 'in_trash': False, 'transcript_progress': {'current': '46.5', 'rate': '0.72'}, 'scheduler_type': 0, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1, 'topic': '8093'}]}}\n",
"转写中...0.47%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}, 'status': [{'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'in_trash': False, 'expire_time': -1, 'scheduler_type': 0, 'object_status': 1, 'duration': 1677340, 'transcript_progress': {'current': '48.65', 'rate': '0.72'}}]}}\n",
"转写中...0.49%\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'code': 0, 'msg': 'success', 'data': {'status': [{'scheduler_type': 0, 'scheduler_execute_delta_time': -1, 'object_status': 1, 'duration': 1677340, 'transcript_progress': {'current': '51.51', 'rate': '0.72'}, 'in_trash': False, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'expire_time': -1}], 'ws_config': {'http_interval': 60, 'ws_enable': False, 'heartbeat_interval': 20}}}\n",
"转写中...0.52%\n",
"{'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1, 'topic': '8093', 'expire_time': -1, 'in_trash': False, 'scheduler_execute_delta_time': -1, 'duration': 1677340, 'transcript_progress': {'current': '54.37', 'rate': '0.72'}, 'scheduler_type': 0}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}, 'code': 0}\n",
"转写中...0.54%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'duration': 1677340, 'expire_time': -1, 'in_trash': False, 'scheduler_type': 0, 'object_status': 1, 'topic': '8093', 'transcript_progress': {'current': '57.23', 'rate': '0.72'}, 'scheduler_execute_delta_time': -1}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.57%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'duration': 1677340, 'expire_time': -1, 'scheduler_execute_delta_time': -1, 'object_status': 1, 'topic': '8093', 'transcript_progress': {'rate': '0.72', 'current': '59.38'}, 'in_trash': False, 'scheduler_type': 0}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.59%\n",
"{'data': {'status': [{'topic': '8093', 'in_trash': False, 'duration': 1677340, 'transcript_progress': {'current': '61.53', 'rate': '0.72'}, 'expire_time': -1, 'scheduler_type': 0, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1}], 'ws_config': {'heartbeat_interval': 20, 'http_interval': 60, 'ws_enable': False}}, 'code': 0, 'msg': 'success'}\n",
"转写中...0.62%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'duration': 1677340, 'transcript_progress': {'rate': '0.72', 'current': '64.39'}, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'in_trash': False, 'scheduler_type': 0, 'scheduler_execute_delta_time': -1, 'object_status': 1, 'expire_time': -1}], 'ws_config': {'heartbeat_interval': 20, 'http_interval': 60, 'ws_enable': False}}}\n",
"转写中...0.64%\n",
"{'code': 0, 'msg': 'success', 'data': {'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}, 'status': [{'object_status': 1, 'duration': 1677340, 'transcript_progress': {'current': '66.53', 'rate': '0.72'}, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'topic': '8093', 'expire_time': -1, 'in_trash': False, 'scheduler_type': 0}]}}\n",
"转写中...0.67%\n",
"{'code': 0, 'msg': 'success', 'data': {'status': [{'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 1, 'topic': '8093', 'duration': 1677340, 'expire_time': -1, 'in_trash': False, 'scheduler_type': 0, 'transcript_progress': {'rate': '0.72', 'current': '69.4'}, 'scheduler_execute_delta_time': -1}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}}\n",
"转写中...0.69%\n",
"{'data': {'status': [{'topic': '8093', 'scheduler_type': 0, 'scheduler_execute_delta_time': -1, 'object_token': 'obcnae9145x56f52e2aj5761', 'object_status': 2, 'duration': 1677340, 'transcript_progress': {'current': '', 'rate': ''}, 'expire_time': -1, 'in_trash': False}], 'ws_config': {'ws_enable': False, 'heartbeat_interval': 20, 'http_interval': 60}}, 'code': 0, 'msg': 'success'}\n",
"转写完成http://meetings.feishu.cn/minutes/obcnae9145x56f52e2aj5761\n"
]
}
],
"source": [
"import base64, time, uuid, zlib\n",
"import requests\n",
"from multiprocessing import Pool\n",
"\n",
"\n",
"# 不使用系统代理\n",
"proxies = {\"http\": None, \"https\": None}\n",
"\n",
"class FeishuUploader:\n",
" def __init__(self, file_path, cookie):\n",
" self.file_path = file_path\n",
" self.block_size = 2**20*4\n",
" self.headers = {\n",
" 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',\n",
" 'cookie' : cookie,\n",
" 'bv-csrf-token' : cookie[cookie.find('bv_csrf_token=') + len('bv_csrf_token='):cookie.find(';', cookie.find('bv_csrf_token='))],\n",
" 'referer' : f'https://meetings.feishu.cn/minutes/home'\n",
" }\n",
" if len(self.headers.get('bv-csrf-token')) != 36:\n",
" raise Exception(\"cookie中不包含bv_csrf_token请确保从请求`list?size=20&`中获取!\")\n",
"\n",
" self.upload_token = None\n",
" self.vhid = None\n",
" self.upload_id = None\n",
" self.object_token = None\n",
"\n",
" with open(self.file_path, \"rb\") as f:\n",
" self.file_size = f.seek(0, 2)\n",
" f.seek(0)\n",
" self.file_header = base64.b64encode(f.read(512)).decode()\n",
"\n",
" def get_quota(self):\n",
" file_info = f'{uuid.uuid1()}_{self.file_size}'\n",
" quota_url = f'https://meetings.feishu.cn/minutes/api/quota?file_info[]={file_info}&language=zh_cn'\n",
" quota_res = requests.get(quota_url, headers=self.headers, proxies=proxies).json()\n",
" self.upload_token = quota_res['data']['upload_token'][file_info]\n",
"\n",
" # 分片上传文件(预上传)\n",
" # doc: https://open.feishu.cn/document/server-docs/docs/drive-v1/upload/multipart-upload-file-/upload_prepare\n",
" def prepare_upload(self):\n",
" file_name = self.file_path.split(\"\\\\\")[-1]\n",
" prepare_url = f'https://meetings.feishu.cn/minutes/api/upload/prepare'\n",
" data = {\n",
" \"name\" : file_name,\n",
" \"file_size\": self.file_size,\n",
" \"file_header\": self.file_header,\n",
" \"drive_upload\" :True,\n",
" \"upload_token\" : self.upload_token,\n",
" }\n",
" prepare_res = requests.post(prepare_url, headers=self.headers, proxies=proxies, json=data).json()\n",
" self.vhid = prepare_res['data']['vhid']\n",
" self.upload_id = prepare_res['data']['upload_id']\n",
" self.object_token = prepare_res['data']['object_token']\n",
"\n",
" # 分片上传文件(上传分片)\n",
" # doc: https://open.feishu.cn/document/server-docs/docs/drive-v1/upload/multipart-upload-file-/upload_part\n",
" def upload_blocks(self):\n",
" with open(self.file_path, \"rb\") as f:\n",
" f.seek(0)\n",
" block_count = (self.file_size + self.block_size - 1) // self.block_size\n",
" pool = Pool(processes=6)\n",
" for i in range(block_count):\n",
" block_data = f.read(self.block_size)\n",
" block_size = len(block_data)\n",
" print(f\"Block {i}: {block_size}\")\n",
" checksum = zlib.adler32(block_data) % (10 ** 10)\n",
" upload_url = f'https://internal-api-space.feishu.cn/space/api/box/stream/upload/block?upload_id={self.upload_id}&seq={i}&size={block_size}&checksum={checksum}'\n",
" pool.apply_async(requests.post, args=(upload_url,), kwds={'headers': self.headers, 'proxies': proxies, 'data': block_data})\n",
" pool.close()\n",
" pool.join()\n",
"\n",
" # 分片上传文件(完成上传)\n",
" # doc: https://open.feishu.cn/document/server-docs/docs/drive-v1/upload/multipart-upload-file-/upload_finish\n",
" def complete_upload(self):\n",
" complete_url1 = f'https://internal-api-space.feishu.cn/space/api/box/upload/finish/'\n",
" json = {\n",
" \"upload_id\": self.upload_id,\n",
" \"num_blocks\": (self.file_size + self.block_size - 1) // self.block_size,\n",
" \"vhid\": self.vhid,\n",
" \"risk_detection_extra\" : \"{\\\"source_terminal\\\":1,\\\"file_operate_usage\\\":3,\\\"locale\\\":\\\"zh_cn\\\"}\"\n",
" }\n",
" res = requests.post(complete_url1, headers=self.headers, proxies=proxies, json=json).json()\n",
" print(res)\n",
"\n",
" complete_url2 = f'https://meetings.feishu.cn/minutes/api/upload/finish'\n",
" json = {\n",
" \"auto_transcribe\" : True,\n",
" \"language\" : \"mixed\",\n",
" \"num_blocks\": (self.file_size + self.block_size - 1) // self.block_size,\n",
" \"upload_id\": self.upload_id,\n",
" \"vhid\": self.vhid,\n",
" \"upload_token\" : self.upload_token,\n",
" \"object_token\" : self.object_token,\n",
" }\n",
" res = requests.post(complete_url2, headers=self.headers, proxies=proxies, json=json).json()\n",
" print(res)\n",
"\n",
" # 上传完成后检查是否转写完成\n",
" while True:\n",
" object_status_url = f'https://meetings.feishu.cn/minutes/api/batch-status?object_token[]={self.object_token}&language=zh_cn'\n",
" object_status = requests.get(object_status_url, headers=self.headers, proxies=proxies).json()\n",
" print(object_status)\n",
" if object_status['data']['status'][0]['object_status'] == 2:\n",
" print(f\"转写完成http://meetings.feishu.cn/minutes/{object_status['data']['status'][0]['object_token']}\")\n",
" break\n",
" print(f\"转写中...{float(object_status['data']['status'][0]['transcript_progress']['current'])/100:.2f}%\")\n",
" time.sleep(3)\n",
"\n",
" def upload(self):\n",
" self.get_quota()\n",
" self.prepare_upload()\n",
" self.upload_blocks()\n",
" self.complete_upload()\n",
"\n",
"\n",
"if __name__ == '__main__':\n",
"\n",
" # 在飞书妙记主页获取\n",
" cookie = \"minutes_csrf_token=ea0b6372-d541-49fd-9fca-e6e579ed6c56; m_ce8f16=65613062363337322d643534312d343966642d396663612d653665353739656436633536b37b91f4efa89b27b410d5626626f1b2ebf3ed82d6b510030362344fb5776178; __tea__ug__uid=2399591691287585247; Hm_lvt_e78c0cb1b97ef970304b53d2097845fd=1691287586; Hm_lpvt_e78c0cb1b97ef970304b53d2097845fd=1691287586; _gcl_au=1.1.1631485248.1691287586; passport_web_did=7264024950279913500; QXV0aHpDb250ZXh0=825bfa61b8ce47d6a89b987cdb581ff9; locale=zh-CN; trust_browser_id=48711549-c255-44b4-820f-442ea9608738; fid=80a777ac-f638-404f-8e7c-0902ac3cf140; lang=zh; _csrf_token=d0a421e1a93d873197fbf7134ab4c8f6a76769dd-1697598422; landing_url=https://login.feishu.cn/accounts/page/login?redirect_uri=https%3A%2F%2Fmeetings.feishu.cn%2Fminutes%2Fhome&app_id=16&should_pass_through=1&from=byteview_meeting_object; _ga=GA1.2.1302241623.1691287588; _gid=GA1.2.2068635412.1697867029; session=XN0YXJ0-31cg8369-b829-495d-ab17-8d31a56fc100-WVuZA; session_list=XN0YXJ0-31cg8369-b829-495d-ab17-8d31a56fc100-WVuZA; bv_csrf_token=25758c71-aa97-4174-b6e0-92625ce7ea3d; m_e09b70=32353735386337312d616139372d343137342d623665302d393236323563653765613364b37b91f4efa89b27b410d5626626f1b2ebf3ed82d6b510030362344fb5776178; _ga_VPYRHN104D=GS1.1.1697867029.2.1.1697867180.0.0.0; MM_U_ID=006c90d75f171009579f3ec6e755529eb47d86a0; sl_session=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTc5MTAzODIsInVuaXQiOiJldV9uYyIsInJhdyI6eyJtZXRhIjoiQVYrN0Z3OUxBSUFEWDdzWEQwSEJBQVJrendBMHNRSkFIR1RQQURTeEFrQWNaVE5scXN6QVFCd0NLZ0VBUVVGQlFVRkJRVUZCUVVKc1RUSlhjVEkwVWtGQlVUMDkiLCJpZGMiOlsxLDJdLCJzdW0iOiJlNDhlNDZjMTIzZWM1ZTk3MGIxYjY1OWU1MmUxOTUwNmEwNmQ2ZDAwYmNjMjY1MjllYzYzMzQwY2QxOThiMTNmIiwibG9jIjoiemhfY24iLCJhcGMiOiJSZWxlYXNlIiwiaWF0IjoxNjk3ODY3MTgyLCJzYWMiOnsiVXNlclN0YWZmU3RhdHVzIjoiMSIsIlVzZXJUeXBlIjoiNDIifSwibG9kIjpudWxsLCJucyI6ImxhcmsiLCJuc191aWQiOiI2ODk4MTMyNjA4Njk4MzE4ODUxIiwibnNfdGlkIjoiNjg5ODEzMjYwODU0MzE2MjM3MiIsIm90IjowfX0.JfoJxXHUlKLPJGpM3Td-Qg2dAYG3ntlBqOgbCKO5XU33lHGELeZhq7dYZnp8tgKnQ3QhlPO9NlAz_fU8zEeb7Q; home8e9bfaeded6957ef07dfd71b5753f855065e9207={%22filterOption%22:{%22rankType%22:1%2C%22order%22:%22desc%22}%2C%22objectOwnerType%22:1%2C%22recentOpenTab%22:1%2C%22timeColumnKey%22:%22time%22}; passport_app_access_token=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTc5MTAzOTgsInVuaXQiOiJldV9uYyIsInJhdyI6eyJtX2FjY2Vzc19pbmZvIjp7IjE2Ijp7ImlhdCI6MTY5Nzg2NzE4NSwiYWNjZXNzIjp0cnVlfSwiMiI6eyJpYXQiOjE2OTc4NjcxOTgsImFjY2VzcyI6dHJ1ZX19LCJzdW0iOiJlNDhlNDZjMTIzZWM1ZTk3MGIxYjY1OWU1MmUxOTUwNmEwNmQ2ZDAwYmNjMjY1MjllYzYzMzQwY2QxOThiMTNmIn19.9kJ3WnK16ZwRTfiXw5536Wcmf2zPzVKFMTVrW3ajrOF1Xs_6ewG8q_t_jPrpC3KmV5HzQZkX5WpHoYiBt16RXA; is_anonymous_session=; _tea_utm_cache_1229=undefined; shortscc=4; swp_csrf_token=a1f81dc5-6619-43b2-9762-aa6f43ad0dfe; t_beda37=da2d9afc338f12aa28cec8ecdf932dd739bc59ea887ce80e42108695bd57284b\"\n",
"\n",
" # 你要上传的文件所在路径\n",
" file_path = r\"8093.mp3\"\n",
"\n",
" uploader = FeishuUploader(file_path, cookie)\n",
" uploader.upload()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6ec4f4d1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}