Strykscraper is a Go package designed to fetch and parse data from Stryktipset. It extracts betting odds (from "oddset"), percentage distrubtions from the players, aswell as the percentage equvalent of the odds.
Keep in mind this is just scraping data from the website, and could break at any time.
To install the package, run:
go get "github.com/jeer00/strykscraper/strykscraper"
To use the package, import it in your Go code:
import "github.com/jeer00/strykscraper/strykscraper"
Then, use the FetchData
function to fetch the data:
odds, bets, err := strykscraper.FetchData()
The function returns three values:
odds
: A slice ofOdds
structs, containing the betting odds and related information.bets
: A slice ofBet
structs, containing information about the betting events.err
: An error object, if any error occurred during the fetching process.
func FetchData() ([]Bet, []Odds, error)
type Bet struct {
MatchId string
EventDescription string
EventTypeStatisticId string
}
type Odds struct {
MatchId string
Odds []float64
Distribution []int
Favourites []float64
}