import requests
import boto3
s3 = boto3.client('s3')
bucket_name = 'your_bucket_name'
# List of datasets you want to download
datasets = [
'events',
'matches',
'competitions.json',
'lineups'
]
# Download the datasets and upload them to S3
for dataset in datasets:
url = f'https://github.com/statsbomb/open-data/blob/master/data/{dataset}.json?raw=true'
response = requests.get(url, stream=True)
s3.upload_fileobj(response.raw, bucket_name, f'{dataset}.json')
1条答案
按热度按时间ni65a41a1#