I did this work and code and realized I have to subscribe to the API within the code-RapidAPI. You can login and create an account but also must subscribe to the API.
I pushed this to git because it was an hour of prelimanary work before using torch, maybe someone can use it.
simply clone it.
git clone www.github.com/bschleter/lottery-code.git
Do it in the format as the .env example.
YOUR_API_KEY=
python getdata.py
Enjoy.