Python code for website login and submitting forms
I need a Python code that can log onto http://www.pinnaclesports.com/m (mobile version) and place a bet automatically.
You pick a game on the day you write the code to test against (the game has to be a game from either NBA, NCAA, NFL, NHL or MBL). This game is defined as a string and I need to be able to change this string and the code must still work.
e.g you pick the game Dallas Mavericks vs. New York Knicks, then the start string should be
var1 = 'NBA'
game = 'Dallas Mavericks vs. New York Knicks'
The pseudocode looks like this
login to url
if var1 == 'NBA'
go to link1
if var1 == 'NCAA'
go to link2
if var1 == 'MBL'
go to link3
if var1 == 'NHL'
go to link4
if var1 == 'NFL'
go to link5
hval = '+3.5' # If the bet is handicap, this is the handicap that should be bet on
tpval = '202.5' # if the bet is total points, this is the total points that should be bet on
odds = 1.7 # this is a reference odds to check against
if var2 == 1
place bet on moneyline for team1
if var2 == 2
place bet on moneyline for team2
if var2 == 3
place bet for handicap hval for team1
if var2 == 4
place bet for handicap hval for team2
if var2 == 5
place bet for total points > tpval
if var2 == 6
place bet for total points < tpval
Before submitting a bet, the bet odds retrieved from the site should be checked against the variable odds. (if getRealOdds > odds) then place bet.
log out of site
The project will require you to create an account with pinnaclesports.com to test the code.
I don't expect this project to take more than 5 hours for a skilled programmer.