kevintrinh1227 / prize-pick-predictions Goto Github PK
View Code? Open in Web Editor NEWA sport predictions full-stack application that generates betting recommendations & data on Prize Picks using linear regression.
License: MIT License
A sport predictions full-stack application that generates betting recommendations & data on Prize Picks using linear regression.
License: MIT License
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.
###########################################
###########################################
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)
Hey, your project is wonderful, I was having this error while starting the app:
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:
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.