MCPcopy Create free account
hub / github.com/NoEdgeAI/doc2x-doc / get_export_result

Function get_export_result

Python/requests/pdf2file.py:58–66  ·  view source on GitHub ↗
(uid: str)

Source from the content-addressed store, hash-verified

56
57
58def 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
69def download_file(file_url: str, output_path: str):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected