Am I being stupid here?
I have downloaded the list of files using curl, see some examples below:
then go to download the file as per the examples at https://historicdata.betfair.com/#/apidocs
My python code for doing this is:
Yet the bz2 file isn't an archive file, it contains HTML and so not the historical data I was expecting
I have downloaded the list of files using curl, see some examples below:
Code:
filepaths = [ '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337686/1.159918711.bz2', '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337690/1.159918405.bz2', '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337690/1.160967766.bz2', '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337692/1.159918303.bz2' .....
My python code for doing this is:
Code:
import requests headers = { 'ssoid': 'MY TOKEN HERE', } params = { 'filePath': "/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337686/1.159918711.bz2", } response = requests.get('https://historicdata.betfair.com/api/DownloadFile', params=params, headers=headers) fw = open('data.bz2', 'wb') fw.write(response.content) fw.close()
Yet the bz2 file isn't an archive file, it contains HTML and so not the historical data I was expecting
Comment