嗨@Aidan霍夫曼可以使用Sharepoint Rest API與磚
請參考下麵的代碼
從office365.sharepoint。client_context從office365.runtime.auth.client_credential進口進口ClientContext ClientCredential sharepoint_base_url = " https://site.sharepoint.com/sites/group/ " READ_DIR = " /網站/組/共享文檔/文件夾/文件夾#安裝sharepoint訪問client_credentials = ClientCredential (client_id, client_secret) ctx = ClientContext結構(sharepoint_base_url) .with_credentials (client_credentials)“def download_sharepoint_file (file_url): temp_dir = tempfile.mkdtemp () download_path = os.path。加入(temp_dir os.path.basename (file_url))與開放(download_path,“世界銀行”)作為local_file:文件= ctx.web.get_file_by_server_relative_path (file_url) .download (local_file) .execute_query()返回download_path
嗨@Aidan霍夫曼可以使用Sharepoint Rest API與磚
請參考下麵的代碼
從office365.sharepoint。client_context從office365.runtime.auth.client_credential進口進口ClientContext ClientCredential sharepoint_base_url = " https://site.sharepoint.com/sites/group/ " READ_DIR = " /網站/組/共享文檔/文件夾/文件夾#安裝sharepoint訪問client_credentials = ClientCredential (client_id, client_secret) ctx = ClientContext結構(sharepoint_base_url) .with_credentials (client_credentials)“def download_sharepoint_file (file_url): temp_dir = tempfile.mkdtemp () download_path = os.path。加入(temp_dir os.path.basename (file_url))與開放(download_path,“世界銀行”)作為local_file:文件= ctx.web.get_file_by_server_relative_path (file_url) .download (local_file) .execute_query()返回download_path