Sign inSign up

hibare/go-yts

By hibare

•Updated 3 months ago

A program to watch for Popular downloads on YTS and send notifications

Image
0

9.7K

hibare/go-yts repository overview

⁠Go-YTS

Golang program to watch for Popular Downloads on YTS and send notifications.

Script uses web scrapping methodology to check for popular downloads.

⁠Deployment / Execution

There are two ways to run this program.

  1. Run binary directly on host.
  2. Run in Docker
⁠Run binary directly on host

For each release, binaries are published on Github release page using goreleaser.

  • Download platform specific binary from Github release page.
  • Build binary on the host

To build binary on the host, clone this repo and execute following command in the root of project directory.

go build -o /bin/go_yts ./cmd/yts/main.go

Rename file app.env.example to app.env and populate all environment variables required for the program to execute. Alternatively, you can export environment variables.

⁠Run in Docker

go-cyts is packaged as docker container. Docker image is available on Docker Hub⁠.

Use following docker-compose.yml definition to run it in Docker.

version: "3.7"
services:
  go-yts:
    image: hibare/go-yts
    container_name: go-yts
    hostname: go-yts
    restart: always
    environment:
      - SCHEDULE=0 */4 * * *
      - DATA_DIR=/data
      - HISTORY_FILE=history.json
    volumes:
        - go-yts:/data
volumes:
  go-yts:

⁠Environment Variables

VariableDescriptionDefault Value
SCHEDULEInternal cron schedule. Uses standard cron notation0 /4 * * *
DATA_DIRDirectory to store history file/data
HISTORY_FILEHistory filenamehistory.json
TIMEOUTRequest timeout value for scrapper60 Seconds
SLACK_WEBHOOKSlack notification webhook-
DISCORD_WEBHOOKDiscord notification webhook-

⁠Notifications

Currently, only Slack and Discord are supported as notification destinations.

Configure Slack & Discord notifications using environment variables SLACK_WEBHOOK & DISCORD_WEBHOOK respectively.

Tag summary

Content type

Image

Digest

sha256:86fcfc0fb…

Size

20 MB

Last updated

over 1 year ago

docker pull hibare/go-yts