Code Monkey home page Code Monkey logo

youtube-downloader's Introduction

youtube-downloader

demo

Usage

  1. Go to releases page and download the latest version
  2. Run the executable that you have downloaded by double-clicking in it
  3. Visit the http://localhost:8080 page

Building from the source code

requirements: Nodejs

After downloading this project source, run the following commands:

npm install --prod
npm start

And visit http://localhost:8080

For Linux users

Add a /etc/hosts entry like the following:

127.0.0.2 ytd.com

Then you add an iptables rule to redirect the traffic incoming into 127.0.0.2:8080 to 127.0.0.1:80:

iptables -t nat -A OUTPUT -d 127.0.0.2 -p tcp --dport 80 -j REDIRECT --to-port 8080

Now you can access the app in your browser through http://ytd.com or
in your network through http://<your IP>:8080 address

or, using Docker

# After downloading this project source

docker build --tag yt-downloader:latest --build-arg CREATED_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" --build-arg SOURCE_COMMIT="$(git rev-parse --short HEAD)" .

docker run --detach                     \
  --restart=always                      \
  --name "yt"                           \
  --memory 4G --memory-reservation=256m \
  --publish '0.0.0.0:4444:8080'         \
  yt-downloader

And visit http://localhost:4444

Development usage

Run:

npm install
export PORT=4444
npm run dev

And go to http://localhost:4444

Every change in *.js files will reload the server.

or, using docker-compose

Doing a pure-Docker development

export PORT=8080
npm run c:build
npm run up
npm run logs

## Open the entry file `app.js` in your favorite text editor.
## Changes will reload the server that is running inside Docker container.

# In another shell session:
export PORT=8080
## to install dependencies in the up running container
npm run c:npm install <dependency name ...>
## to remove dependencies
npm run c:npm uninstall <dependency name ...>

Releasing

We'll use pkg tool to generate the executable files.

youtube-downloader's People

Contributors

micalevisk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

alex-delaveau

youtube-downloader's Issues

Fix Error "Could not find player config"

when I tried to download some video

          Error: Could not find player config
              at exports.getBasicInfo (/usr/src/app/node_modules/ytdl-core/lib/info.js:59:13)
              at processTicksAndRejections (internal/process/task_queues.js:94:5)
              at async Function.exports.<computed> [as getBasicInfo] (/usr/src/app/node_modules/ytdl-core/lib/info.js:297:18)
              at async Object.<anonymous> (/usr/src/app/app.js:77:21)

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.