I'm relatively new to Python and have been left scratching my head now for a few days whilst trying to resolve what I feel should be a relatively straightforward task.
The aim is to connect to a corporate SharePoint site (i.e. xxxxx.sharepoint.com) and download a CSV file that's stored there to somewhere on the network (or even local system).
The file can be found in the following location. If I copy and paste it in to a the web address field it downloads the file perfectly:
https://xxxxxx.sharepoint.com/sites/MSS/im/pa/ReportData/DirectorMap.csv
However, try as I might, I cannot seem to download it via a Python script. I believe we are behind a proxy server (no credentials required):
https://example.proxy.com:8080
I've tried using requests, requests_ntlm, sharepoint, urllib3 etc etc but constantly get a "403: Forbidden" error. I have tried passing it my own credentials (and given the file was created by myself on SharePoint I can't see that it would be down to me genuinely not having access).
Is anyone able to post a script that will achieve my aims, based on the proxy and url I've posted above?