import re
import json
import os
import six
from kaggle.api.kaggle_api_extended import KaggleApi
# Un-comment if you want to read the credentials from a file
with open(os.path.expanduser("~/.kaggle/kaggle.json"), "rb") as f:
creds = json.load(f)
os.environ["KAGGLE_USERNAME"] = creds["username"]
os.environ["KAGGLE_KEY"] = creds["key"]
api = KaggleApi()
api.authenticate()
api.competitions_data_download_file(id="deepfake-detection-challenge", file_name="dfdc_train_all.zip")
OR
api.competitions_data_download_file(id=16880, file_name="dfdc_train_all.zip")
Hi everyone, I was trying the Kaggle API for the first time the previous week, that seems pretty nice, but I'm facing an issue.
The dataset is provided by Meta deepfake-detection-challenge: https://www.kaggle.com/c/16880/datadownload/dfdc_train_all.zip
This is the code I'm using:
I get: ApiException: (404) Reason: Not Found
with => 'Turbolinks-Location': 'https://www.kaggle.com/api/v1/competitions/data/download/deepfake-detection-challenge/dfdc_train_all.zip' (that seems correct?) Or 'https://www.kaggle.com/api/v1/competitions/data/download/16880/dfdc_train_all.zip'
Thanks for your feedbacks !