jemorriso / pysbr Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Is there a reverse look up for Sportsbook Names being used? From the documentation, the examples are Bovada and Pinnacle. Using BestLines, the SportBook Ids can be obtained. How can one obtain the Sports Book names?
Thanks.
Great stuff!
How did you go about getting sbr team ids? If you point me the way I can help fill in the missing data.
Small thing:
ncaab = NCAAB()
ncaab.team_id("uconn") # Not there
ncaab.team_id("huskies") # Not there
ncaab._team_ids
Can't find UConn Huskies for the life of me... is it just missing?? If not, what pattern can I use to find their id?
Great job with this by the way!!
Grabbed the CurrentLines for Pinnacle (MLB, sometime in June 2019) and it worked fine with sb.ids('Pinnacle')
:
closemoneylines = CurrentLines(e.ids(),mlb.market_ids(['moneyline']),sb.ids('Pinnacle'))
Tried the same thing with 'OpeningLines' instead of 'CurrentLines' and I got the following error:
TypeError: Expected <class 'int'>, got [20]
I checked and saw Pinnacle's ID was 20, so I just indexed sb.ids('Pinnacle')
as shown below:
openmoneylines = OpeningLines(e.ids(),mlb.market_ids(['moneyline']),sb.ids('Pinnacle')[0])
Not a big deal but just wanted to point it out in case anyone runs into this issue! Maybe I'm doing something wrong too haha
In Events queries, period / quarter scores are out of order. NaN
where there should be scores has also been observed.
Hello,
As of today, SBR odds service appears to no longer be working. Is anyone else having issues?
Thanks for all the work you have done on this project! It is much appreciated.
Based on this snippit of code:
# Example options found here: https://github.com/JeMorriso/PySBR/blob/main/pysbr/config/sportsbooks.yaml
bookie_list = ['BetOnline', 'Bovada']
game_type = ['moneyline']
### END OF Configurable variables ###
dt = datetime.strptime(datetime.today().strftime('%Y-%m-%d'), '%Y-%m-%d')
nfl = NFL()
nba = NBA()
sb = Sportsbook()
e_nfl = EventsByDate(nfl.league_id, dt)
e_nba = EventsByDate(nba.league_id, dt)
cl_nfl = CurrentLines(e_nfl.ids(), nfl.market_ids(game_type), sb.ids(bookie_list))
cl_nba = CurrentLines(e_nba.ids(), nba.market_ids(game_type), sb.ids(bookie_list))
I should not get getting match results like so from NBA:
elif game.league == "NBA":
print("NBA LEAGUE GAME PROCESSING")
for match in cl_nba.list(e_nba):
if match['event'].lower().find(str(game.team_chosen).lower()): # match found
if match['american odds'] >= int(game.american_odds):
if isinstance(game.bookie_odds, int): # If another bookie has better value replace again
if match['american odds'] > game.bookie_odds:
game.bookie = match['sportsbook']
game.bookie_odds = match['american odds']
else:
game.bookie = match['sportsbook']
game.bookie_odds = match['american odds']
Where SportsBetting
is still in the list when I specifically filter for only ['BetOnline', 'Bovada']
Version Used: 0.2.1
Python Version: 3.9
When I run:
ol = LineHistory(max(e.ids()), ncaab.market_ids('ps')[0], sb.ids('Bovada')[0],[baylor[0],gonzaga[0]])
print(ol.dataframe())
I only get the dataframe for Gonzaga line history, and not both. Should the function be able to accept a list of Team IDs and return a full line history with both teams?
Maybe we can implement a method to avoid hitting it.
I've used this package in the past with success. But now I try running EventsByDateRange and get the following error:
HTTPError: 463 Client Error: for url: https://www.sportsbookreview.com/ms-odds-v2/odds-v2-service
Any idea what happened here? Did I get my IP banned...
Hey Jeremy - great library. I was trying to pull line history for totals using the LineHistory function and it works for every other market except totals markets.
lh = LineHistory(4295653, 402, sb.id('BetOnline'), [1161, 1167])
lh.list()
lh = LineHistory(4295653, 401, sb.id('BetOnline'), [1161, 1167])
lh.list()
An example for you if you want to try.
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.