Git Product home page Git Product logo

yts-downloader's Introduction

yts-downloader

Bulk downloader for YTS movies

How to use:

  • Download this project:
git clone https://github.com/leontiy92/yts-downloader
  • Install MongoDB
  • Install aria2
  • Run aria2 with the supplied configuration file (edit as needed):
aria2c --conf-path=aria2.conf
  • Install Python modules:
pip install -r requirements.txt
  • Run
python3 update-yts.py

to load YTS data to database

  • Run:
python3 downloader.py

You can check the log (downloader.log) for progress.

You can supply a configuration file or modify parameters from command line

python3 downloader.py --help

PS: you can install:

pip install aria2p[tui]

and then run:

aria2p

to see progress

Configuration

Configuration supplied in config file or command-line. Run

python3 downloader.py --help

to see options:

usage: downloader.py [-h] [-c CONFIG_FILE] [-l LOG_FILE] [--log-level LOG_LEVEL] [--mongodb MONGODB] [--mongodb-collection MONGODB_COLLECTION] [--aria-host ARIA_HOST] [--aria-port ARIA_PORT]
                     [--aria-secret ARIA_SECRET] [--max-con-dl MAX_CON_DL] [-q QUALITY] [-d DOWNLOAD_DIR] [-t TEMP_DIR]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        config file path
  -l LOG_FILE, --log-file LOG_FILE
                        log file path
  --log-level LOG_LEVEL
                        log level (DEBUG, INFO, WARN, ERROR)
  --mongodb MONGODB     MogoDB connection string
  --mongodb-collection MONGODB_COLLECTION
                        MogoDB collection to use
  --aria-host ARIA_HOST
                        aria2 host
  --aria-port ARIA_PORT
                        aria2 port
  --aria-secret ARIA_SECRET
                        aria2 secret
  --max-con-dl MAX_CON_DL
                        Maximum concurrent downloads
  -q QUALITY, --quality QUALITY
                        Movie quality to download
  -d DOWNLOAD_DIR, --download-dir DOWNLOAD_DIR
                        Download directory
  -t TEMP_DIR, --temp-dir TEMP_DIR
                        Directory for in-progress downloads

Args that start with '--' (eg. -l) can also be set in a config file (downloader.conf or specified via -c). Config file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax
at https://goo.gl/R74nmi). If an arg is specified in more than one place, then commandline values override config file values which override defaults.

Default configuration file is

downloader.conf

See https://pypi.org/project/ConfigArgParse/ for details

yts-downloader's People

Contributors

leontiy92 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

yts-downloader's Issues

error handling

I've played with the downloader a bit.
Two issues:

  1. the script needs dl & movies directories. Found out it doesn't create directory.
  2. After playing a bit, I get:
...
File "/usr/lib/python3.8/pathlib.py", line 1359, in rename
    self._accessor.rename(self, target)
FileNotFoundError: [Errno 2] No such file or directory: '/root/yts-downloader/dl/725/...' -> '/root/yts-downloader/...'

(redacted a bit)

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.