I'm trying to extract Titanic training and test data using Jupyter Notebook. Find below my code snippet.
payload = {
'action': 'login',
'username': os.environ.get("KAGGLE_USERNAME"),
'password': os.environ.get("KAGGLE_PASSWORD")
}
url = "https://www.kaggle.com/c/3136/download/train.csv"
with session() as c:
c.post('https://www.kaggle.com/account/login', data=payload)
response = c.get(url)
print(response.text)
After executing this, I'm getting a HTML response instead of training data. I configured my Kaggle login credentials in .env file properly as well. Did I do something wrong here?