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

Function download_file

Python/requests/pdf2file.py:69–73  ·  view source on GitHub ↗
(file_url: str, output_path: str)

Source from the content-addressed store, hash-verified

67
68
69def download_file(file_url: str, output_path: str):
70 res = rq.get(file_url)
71 res.raise_for_status() # 检查HTTP请求是否成功
72 with open(output_path, "wb") as f:
73 f.write(res.content)
74
75
76def main(file):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected