JRAネット投票スクレイピング参考資料
開催日以外は見られなくなってしまうので検証ツールでの表示を記録しておきます!
投票履歴
<button type="button" class="btn btn-default btn-reference" ng-click="vm.toggleShowRefer()">投票履歴</button>
<td class="header-column">1日分購入金額</td>
<td class="text-right ng-binding">0円</td>
<td class="header-column">1日分払戻金額</td>
<td class="text-right ng-binding">0円</td>
通常投票画面
式別
<select id="bet-basic-type" ng-model="vm.oSelectType" ng-options="oType as oType.name for oType in vm.oaType" ng-change="vm.changeType()" class="ng-valid ng-not-empty ng-dirty ng-valid-parse ng-touched" aria-invalid="false" style=""><option label="単勝" value="object:1001" selected="selected">単勝</option><option label="複勝" value="object:1002">複勝</option><option label="枠連" value="object:1003">枠連</option><option label="馬連" value="object:1004">馬連</option><option label="ワイド" value="object:1005">ワイド</option><option label="馬単" value="object:1006">馬単</option><option label="3連複" value="object:1007">3連複</option><option label="3連単" value="object:1008">3連単</option></select>
方式
<select id="bet-basic-method" ng-model="vm.oSelectMethod" ng-options="oMethod as oMethod.CC_NAME for oMethod in vm.oaMethod" ng-change="vm.changeMethod()" ng-if="vm.visibleMethod()" class="ng-pristine ng-valid ng-scope ng-not-empty ng-touched" aria-invalid="false" style=""><option label="通常" value="object:1526" selected="selected">通常</option><option label="ながし" value="object:1527">ながし</option><option label="ボックス" value="object:1528">ボックス</option><option label="フォーメーション" value="object:1529">フォーメーション</option></select>
単勝
<label ng-attr-for="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="no1">
<!-- ngIf: !vm.bEdit --><input type="checkbox" ng-attr-id="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" name="racer1" ng-model="vm.oHorseNoSelectInfo.horse1[racer.horseNum]" ng-true-value="true" ng-false-value="false" ng-change="vm.selectHorseNo(racer.horseNum)" ng-disabled="vm.isCancelOdds(racer.winOdds)" ng-if="!vm.bEdit" class="ng-valid ng-scope ng-dirty ng-valid-parse ng-touched ng-empty" id="no1" aria-invalid="false" style=""><!-- end ngIf: !vm.bEdit -->
<!-- ngIf: vm.bEdit -->
<span class="check" ng-disabled="vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
try:
click_css_selector(driver, "label[for^=no{}]".format(horse_num), 0)
ticket_nm = int(bet_amount / 100) # intにしないとfloatで小数点無視して10倍多く賭けてしまう
driver.find_element(By.CSS_SELECTOR, "input[ng-model^='vm.nUnit']").send_keys(ticket_nm)
except Exception as e:
print(f"Error in selecting horse number and entering bet amount: {e}")
複勝
<label ng-attr-for="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="no1">
<!-- ngIf: !vm.bEdit --><input type="checkbox" ng-attr-id="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" name="racer1" ng-model="vm.oHorseNoSelectInfo.horse1[racer.horseNum]" ng-true-value="true" ng-false-value="false" ng-change="vm.selectHorseNo()" ng-disabled="vm.isCancelOdds(racer.winOdds)" ng-if="!vm.bEdit" class="ng-pristine ng-untouched ng-valid ng-scope ng-empty" id="no1" aria-invalid="false"><!-- end ngIf: !vm.bEdit -->
<!-- ngIf: vm.bEdit -->
<span class="check" ng-disabled="vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
枠連
<label ng-attr-for="frameNo{{racer.stallNum + vm.CC_SUFFIX_RETRY}}" for="frameNo1">
<input type="checkbox" ng-attr-id="frameNo{{racer.stallNum + vm.CC_SUFFIX_RETRY}}" ng-model="vm.oHorseNoSelectInfo.horse1[racer.stallNum]" ng-true-value="true" ng-false-value="false" ng-change="vm.selectStall()" ng-disabled="vm.isDisabledOfStall(racer.stallNum)" class="ng-valid ng-dirty ng-valid-parse ng-touched ng-empty" id="frameNo1" aria-invalid="false" style="">
<span class="check" ng-disabled="vm.isDisabledOfStall(racer.stallNum)" aria-disabled="false"></span>
</label>
ゾロ目ボタン
<button class="btn btn-default btn-xs" ng-click="vm.selectedRepdigit()" ng-class="{'on-small': vm.bRepdigitFlag}" ng-disabled="vm.bDisabledRepdigitFlag" style="">ゾロ目</button>
馬連
<label ng-attr-for="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="no1">
<input type="checkbox" ng-attr-id="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" name="racer1" ng-model="vm.oHorseNoSelectInfo.horse1[racer.horseNum]" ng-true-value="true" ng-false-value="false" ng-change="vm.selectHorseNo()" ng-disabled="(vm.bMaxFlag && !vm.oHorseNoSelectInfo.horse1[racer.horseNum]) || vm.isCancelOdds(racer.winOdds)" class="ng-pristine ng-untouched ng-valid ng-empty" id="no1" aria-invalid="false">
<span class="check" ng-disabled="(vm.bMaxFlag && !vm.oHorseNoSelectInfo.horse1[racer.horseNum]) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
ワイド
<label ng-attr-for="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="no1">
<input type="checkbox" ng-attr-id="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" name="racer1" ng-model="vm.oHorseNoSelectInfo.horse1[racer.horseNum]" ng-true-value="true" ng-false-value="false" ng-change="vm.selectHorseNo()" ng-disabled="(vm.bMaxFlag && !vm.oHorseNoSelectInfo.horse1[racer.horseNum]) || vm.isCancelOdds(racer.winOdds)" class="ng-pristine ng-untouched ng-valid ng-empty" id="no1" aria-invalid="false">
<span class="check" ng-disabled="(vm.bMaxFlag && !vm.oHorseNoSelectInfo.horse1[racer.horseNum]) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
馬単
<label ng-attr-for="horse1_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="horse1_no1">
<input type="radio" ng-attr-id="horse1_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" ng-value="racer.horseNum" ng-model="vm.oCheckHorse.first" ng-change="vm.selectHorseNo()" ng-disabled="(racer.horseNum === vm.oCheckHorse.second) || vm.isCancelOdds(racer.winOdds)" ng-init="vm.selectHorseNo()" class="ng-pristine ng-untouched ng-valid ng-not-empty" name="4496" id="horse1_no1" value="1" aria-invalid="false">
<span class="check" ng-disabled="(racer.horseNum === vm.oCheckHorse.second) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
<label ng-attr-for="horse2_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="horse2_no1">
<input type="radio" ng-attr-id="horse2_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" ng-value="racer.horseNum" ng-model="vm.oCheckHorse.second" ng-change="vm.selectHorseNo()" ng-disabled="(racer.horseNum === vm.oCheckHorse.first) || vm.isCancelOdds(racer.winOdds)" class="ng-pristine ng-untouched ng-valid ng-not-empty" name="4497" id="horse2_no1" value="1" aria-invalid="false">
<span class="check" ng-disabled="(racer.horseNum === vm.oCheckHorse.first) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
horse<1着>_no<馬番>
3連複
<label ng-attr-for="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="no1">
<input type="checkbox" ng-attr-id="no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" name="racer1" ng-model="vm.oaHorseNoSelect.horse1[racer.horseNum]" ng-true-value="true" ng-false-value="false" ng-change="vm.selectHorseNo()" ng-disabled="(vm.bMaxFlag) && (!vm.oaHorseNoSelect.horse1[racer.horseNum]) || vm.isCancelOdds(racer.winOdds)" class="ng-pristine ng-untouched ng-valid ng-empty" id="no1" aria-invalid="false">
<span class="check" ng-disabled="(vm.bMaxFlag) && (!vm.oaHorseNoSelect.horse1[racer.horseNum]) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
3連単
<label ng-attr-for="horse1_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="horse1_no1">
<input type="radio" ng-attr-id="horse1_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" ng-value="racer.horseNum" ng-model="vm.oCheckHorse.first" ng-disabled="(racer.horseNum === vm.oCheckHorse.second) || (racer.horseNum === vm.oCheckHorse.third) || vm.isCancelOdds(racer.winOdds)" ng-change="vm.selectHorseNo(racer.horseNum,1)" class="ng-pristine ng-untouched ng-valid ng-not-empty" name="4974" id="horse1_no1" value="1" aria-invalid="false">
<span class="check" ng-disabled="(racer.horseNum === vm.oCheckHorse.second) || (racer.horseNum === vm.oCheckHorse.third) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
<label ng-attr-for="horse2_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="horse2_no1">
<input type="radio" ng-attr-id="horse2_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" ng-value="racer.horseNum" ng-model="vm.oCheckHorse.second" ng-disabled="(racer.horseNum === vm.oCheckHorse.first) || (racer.horseNum === vm.oCheckHorse.third) || vm.isCancelOdds(racer.winOdds)" ng-change="vm.selectHorseNo(racer.horseNum,2)" class="ng-pristine ng-untouched ng-valid ng-not-empty" name="4975" id="horse2_no1" value="1" aria-invalid="false">
<span class="check" ng-disabled="(racer.horseNum === vm.oCheckHorse.first) || (racer.horseNum === vm.oCheckHorse.third) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
<label ng-attr-for="horse3_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" for="horse3_no1">
<input type="radio" ng-attr-id="horse3_no{{racer.horseNum + vm.CC_SUFFIX_RETRY}}" ng-value="racer.horseNum" ng-model="vm.oCheckHorse.third" ng-disabled="(racer.horseNum === vm.oCheckHorse.first) || (racer.horseNum === vm.oCheckHorse.second) || vm.isCancelOdds(racer.winOdds)" ng-change="vm.selectHorseNo(racer.horseNum,3)" class="ng-pristine ng-untouched ng-valid ng-not-empty" name="4976" id="horse3_no1" value="1" aria-invalid="false">
<span class="check" ng-disabled="(racer.horseNum === vm.oCheckHorse.first) || (racer.horseNum === vm.oCheckHorse.second) || vm.isCancelOdds(racer.winOdds)" aria-disabled="false"></span>
</label>
ここから先は
馬場ひかるの競馬予想AI
AItuberになる予定の馬場ひかるのAIを使った競馬予想です!
この記事が気に入ったらサポートをしてみませんか?