Created
August 28, 2024 18:57
-
-
Save socraticprogrammer/dc649d7a137631aa2b7a066cc8e88a47 to your computer and use it in GitHub Desktop.
That Gist is useful for getting all bets on Bet365 after loading the history of account manually. Copy and paste on your Devtools and be happy :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
That Gist is useful for getting all bets on Bet365 after loading the history of account manually. For use it: | |
1. Open your account on Bet365 | |
2. Go to the history page | |
3. Select the period for search bets | |
4. Open the Dev Tools of your browser | |
Finally... | |
Copy and paste on your Devtools and be happy :) | |
Note: An array with all info is available on your console to be copied. | |
*/ | |
const bets = await document.querySelectorAll(".h-BetSummary") | |
const betsFormatted = [] | |
const extractInfoOfBet = (betElement) => { | |
const dateTime = betElement.querySelector('.h-BetSummary_DateAndTime')?.textContent?.trim() | |
const selection = betElement.querySelector('.h-BetSelection_Name')?.textContent?.trim() | |
const odd = betElement.querySelector('.h-BetSelection_Odds')?.textContent?.trim() | |
const stakeDescription = betElement.querySelector('.h-StakeDescription_Text')?.textContent?.trim() | |
const stakeReturn = betElement.querySelector('.h-StakeReturnSection_StakeContainer')?.textContent?.trim() | |
const betReturn = betElement.querySelector('.h-StakeReturnSection_ReturnText')?.textContent?.trim() | |
betsFormatted.push({ | |
dateTime, | |
selection, | |
odd, | |
stakeDescription, | |
stakeReturn, | |
betReturn | |
}) | |
} | |
bets.forEach(extractInfoOfBet) | |
console.info(betsFormatted) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment