Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't get Project working. #4

Open
user506671 opened this issue Jun 19, 2023 · 2 comments
Open

can't get Project working. #4

user506671 opened this issue Jun 19, 2023 · 2 comments

Comments

@user506671
Copy link

Hi,
i tryed to use your Projekt but can't get it work.
find out your file to start is script.py.
the file api.py is not used anyway if im right.

but the fetch_data_from_api() function is asking for an API_LINK i don't now.
what does load_dotenv() do?
and where the hell do i put my API Key. ^^"

Sorry can you help out with this informations? Thanks.

@SoccerCashUK
Copy link

Hi i also got problem I have added the API key and i get this error
Fetching data from API...
An error occurred: Invalid URL 'None': No scheme supplied. Perhaps you meant https://None?

@callmevojtko
Copy link
Owner

Hi everyone,

I updated the README and further clarified the instructions. Was my bad, let me know if you have any issues still getting it to work.

How to Use

  1. Create an account with The Odds API to get an API key. Store your API key in a .env file as API_KEY = . The API key is then used as an argument to the fetch_data_from_api() function in the script.

  2. Once you have your API key, you can paste this API link in your browser: https://api.the-odds-api.com/v4/sports/baseball_mlb/odds/?regions=us&markets=spreads&bookmakers=fanduel,draftkings,barstool&oddsFormat=american&apiKey=**[INSERT YOUR API CODE HERE]** Note: Please see the Odds API docs for more info here

  3. Obtain credentials for Gmail API. These credentials should be stored in a credentials.json file in the root directory of the project. Read more on setting up the Gmail API with Python here

  4. In your .env file, add a variable BET_EMAIL and use the email that is authorized with Gmail API.

  5. Replace msg["To"] = "YOUR_EMAIL_HERE" on line 247 with the email you want to receive the recommendations to.

  6. Once the above prerequisites are completed, you can run the main() function to fetch the betting lines, generate recommendations, and send an email with the recommendations to a specified recipient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants