A application to scrape the Manchested United ticket site to find available matches, prices, and pushes the data to Home Assistant.
# cli usage
docker run -it -v $(pwd)/.cache:/root/.cache robertyoung/manutd-ticket-checker:latest --help
# supply cli commands via env file
docker run -it \
-v $(pwd)/.cache:/root/.cache \
-v $(pwd)/env.yml:/root/env.yml \
robertyoung/manutd-ticket-checker:latest --env-file /root/env.yml
# arm64 support
docker run -it -v $(pwd)/.cache:/root/.cache robertyoung/manutd-ticket-checker:latest-arm64 --help
go install github.com/robertyoung/manutd-ticket-checker/v2@latest
manutd-ticket-checker --help
Or download the latest release from Github
# run application
> ./manutd-ticket-checker
# only show premier league matches
> ./manutd-ticket-checker --premier-league-only
# push state to home assistant and send notification
> ./manutd-ticket-checker --premier-league-only --haas-url ${HA_URL} --haas-token ${HA_TOKEN}
# optionally, a file can be specified to configure the cli
> ./manutd-ticket-checker --env-file env.yml
# cli usage
> ./manutd-ticket-checker -h
NAME:
manutd-ticket-checker - finds available manchester united tickets
USAGE:
manutd-ticket-checker [global options] command [command options] [arguments...]
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--env-file value
--haas-notification-throttle value, --rnd value duration in minutes to wait before resending a notification (default: 60)
--haas-notify-device value, --hnd value device in home assistant to send the notification to
--haas-token value, --ht value token for home assistant to authenticate to the api
--haas-url value, --hu value url of home assistant to push state and messages to
--help, -h show help (default: false)
--max-price value, --mp value the maximum price to mark an event as available (default: 100)
--premier-league-only, --plo filter premier league events only (default: false)
--rod value rod specific arguments, eg. https://go-rod.github.io/#/get-started/README?id=slow-motion-and-visual-trace
# run application
> go run .
# create a snapshot with goreleaser
> goreleaser release --snapshot --rm-dist
# docker build
> docker build -t robertyoung/manutd-ticket-checker:dev .
# m1 macbook local build
> docker buildx build --platform linux/arm64 -t robertyoung/manutd-ticket-checker:dev --load .
# run locally
> docker run -it -v $(pwd)/.cache:/root/.cache robertyoung/manutd-ticket-checker:dev
# build and push to dockerhub
> docker buildx build --platform linux/arm64,linux/amd64 -t robertyoung/manutd-ticket-checker:dev --push .