(uid: str)
| 56 | |
| 57 | |
| 58 | def get_export_result(uid: str): |
| 59 | url = f"{base_url}/api/v2/convert/parse/result?uid={uid}" |
| 60 | headers = {"Authorization": f"Bearer {secret}"} |
| 61 | res = rq.get(url, headers=headers) |
| 62 | res.raise_for_status() # 检查HTTP请求是否成功 |
| 63 | data = res.json() |
| 64 | if data.get("code") == "success": |
| 65 | return data["data"] |
| 66 | raise Exception(f"get export result failed: {data}") |
| 67 | |
| 68 | |
| 69 | def download_file(file_url: str, output_path: str): |