【发布时间】:2020-05-19 03:01:57
【问题描述】:
我想从 SharePoint Online 中的网站页面上传和下载 aspx 文件。有可能吗?
【问题讨论】:
-
我根据this解决了我的问题。
我想从 SharePoint Online 中的网站页面上传和下载 aspx 文件。有可能吗?
【问题讨论】:
您可以通过 Rest API 下载它: Working with files by using REST
下面是一个关于如何下载页面文件的python:
from shareplum import Site
from shareplum import Office365
from shareplum.site import Version
from config import config
# get data from configuration
username = config['sp_user']
password = config['sp_password']
site_name = config['sp_site_name']
base_path = config['sp_base_path']
doc_library = config['sp_doc_library']
authcookie = Office365(base_path, username=username, password=password).GetCookies()
site = Site('https://xxxx.sharepoint.com/sites/abc',version=Version.v365, authcookie=authcookie)
folder = site.Folder('SitePages')
folder.download_file('mysitepage.aspx', 'mysitepage.aspx')
【讨论】: