Office365-REST-Python-Client
Office365-REST-Python-Client copied to clipboard
Get html source of sharepoint page?
How can I easily fetch the html source code from a sharepoint page?
The snippet below works but I do not manage to get the plain html content?
from office365.runtime.auth.user_credential import UserCredential
from office365.sharepoint.client_context import ClientContext
site_url = "https://company.sharepoint.com/sites/<some site>"
ctx = ClientContext(site_url).with_credentials(UserCredential("[email protected]", "somepassword"))
web = ctx.web
ctx.load(web)
ctx.execute_query()
print(web.properties)
print(ctx.web.get().execute_query())
I also have this question. @WG- did you solve it?