Git Product home page Git Product logo

go-yts's Introduction

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

Variable Description Default Value
SCHEDULE Internal cron schedule. Uses standard cron notation 0 /4 * * *
DATA_DIR Directory to store history file /data
HISTORY_FILE History filename history.json
HTTP_REQUEST_TIMEOUT Request timeout value for scrapper 60 Seconds
NOTIFIER_DISCORD_WEBHOOK Discord notification webhook -
NOTIFIER_DISCORD_ENABLED Discord notification status false
LOG_LEVEL Log Level (INFO, ERROR, WARN, DEBUG) INFO
LOG_MODE Log mode (PRETTY, JSON) PRETTY

Notifications

Currently, only Discord is supported as notification destinations.

go-yts's People

Contributors

dependabot[bot] avatar hibare avatar semgrep-bot avatar

Watchers

 avatar

go-yts's Issues

Deprecation: "io/ioutil"

"io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (SA1019)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.