For installation of python and selenium, please see this post
The background of this script was my changing from offshore to US books completely for this baseball season. Unfortunately, there is a large difference in the MLB props for offshore sites as compared to onshore sites. Typically, I had bet Hits/Runs/RBIs as a sum, which was the bets offered by the offshores. They offered it as a matchup, typically 2-4 matchups per games, and typically 4 single player over/unders. Similar with total bases. They had hits as well.
Onshore, it seems to be that the offering is individual players. Needless to say, trying to manually price 18 * 4 props (18 players hits,runs,rbis,bases) is time consuming. I wrote this script to pull in the tables I wanted, and configured excel to read and price them.
Draftkings prop page is set up into tables, IE 1 table for home run, 1 table for RBIs, ect.
A note to remember is that python starts at 0 for numbering. So the first table (Home Runs, which would be 0) is ignored.
This script will pull tables 2, 3, 4 ,5, which are Hits, Bases, RBI's and Runs.
Below is example output:
It will produce an excel sheet with this information.
The background of this script was my changing from offshore to US books completely for this baseball season. Unfortunately, there is a large difference in the MLB props for offshore sites as compared to onshore sites. Typically, I had bet Hits/Runs/RBIs as a sum, which was the bets offered by the offshores. They offered it as a matchup, typically 2-4 matchups per games, and typically 4 single player over/unders. Similar with total bases. They had hits as well.
Onshore, it seems to be that the offering is individual players. Needless to say, trying to manually price 18 * 4 props (18 players hits,runs,rbis,bases) is time consuming. I wrote this script to pull in the tables I wanted, and configured excel to read and price them.
Draftkings prop page is set up into tables, IE 1 table for home run, 1 table for RBIs, ect.
A note to remember is that python starts at 0 for numbering. So the first table (Home Runs, which would be 0) is ignored.
This script will pull tables 2, 3, 4 ,5, which are Hits, Bases, RBI's and Runs.
Below is example output:
Player | Category | Line | Over Odds | Under Odds | |
0 | Abraham Toro | Hits | 0.5 | -180 | 130 |
0 | Adam Frazier | Hits | 1.5 | 185 | -250 |
0 | Alex Bregman | Hits | 0.5 | -195 | 145 |
0 | Chas McCormick | Hits | 0.5 | -165 | 120 |