Git Product home page Git Product logo

kevintrinh1227 / prize-pick-predictions Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 4.0 2.33 MB

A sport predictions full-stack application that generates betting recommendations & data on Prize Picks using linear regression.

License: MIT License

Python 88.63% CSS 4.65% HTML 6.18% JavaScript 0.54%
elo elo-rating elo-rating-algorithm gambling gambling-prediction nba nba-stats prize-picks sport-predictions sports-betting sports-stats

prize-pick-predictions's Introduction

GitHub Streak

prize-pick-predictions's People

Contributors

dependabot[bot] avatar jimpallomeni avatar kevintrinh1227 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

prize-pick-predictions's Issues

Fixing the API issue with Selinium webdriver

I've found a crude workaround the limiting of the prizepicks API. My solution uses a chromium webdriver to access the end point via a browser and scrapes the data using beautiful soup.

###########################################

requirements: download the version of selenium webdriver that matches with your google

chrome and paste it into your CWD.

link: https://chromedriver.chromium.org/downloads

###########################################

from selenium import webdriver
from bs4 import BeautifulSoup
import json

driver = webdriver.Chrome()

#Initializes a web driver and opens the page in a new chrome window
url = 'https://api.prizepicks.com/projections?league_id=7'
driver.get(url)

#Beautiful soup parsing through the page contents
content = driver.page_source
soup = BeautifulSoup(content, 'html.parser')
pre_tag = soup.find('pre') #finds the tag starting with "pre"

#Dumps the json contents into the filenamed "pre_formatted_predictions.json"
json_text = pre_tag.text
data = json.loads(json_text)
filename = "pre_formatted_predictions.json"
with open(filename, "w") as outfile:
json.dump(data, outfile, indent = 1)

Not pulling data from prizepicks

Hey, your project is wonderful, I was having this error while starting the app:
image

I went to the API link that you left on the code and proceed to manually copy and paste that info into the pre_formatted_projections.json file and then it successfully started:

image

Is this expected? I am missing something or the format changed?

Thank you for this development, I was trying to do something similar but this is awesome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.