I'm trying to read data from an HTML table that on a site with a URL like https://mysharepoint.sharepoint.com/sites/mySite/sitepages/tables
And I only have access to the "mySite" site. I've tried using shareplum like their documentation:
from shareplum import Site
from shareplum import Office365
authcookie = Office365('https://abc.sharepoint.com', username='username@abc.com', password='password').GetCookies()
site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', authcookie=authcookie)
But I then get the following error: "requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://abc.sharepoint.com/sites/MySharePointSite/_vti_bin/lists.asmx"
I'm guessing that this is precisely because I don't have access to the root site, but I've also tried doing:
authcookie = Office365('https://abc.sharepoint.com/sites/MySharePointSite/', username='username@abc.com', password='password').GetCookies()
site = Site('https://abc.sharepoint.com/sites/MySharePointSite/', authcookie=authcookie)
But that generated the same error.
Does anyone know a way to specify to shareplum that I want to use my credentials for that specific site, or a way without using shareplum entirely?