GithubHelp home page GithubHelp logo

doc22940 / youtube-downloader-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeckman/youtube-downloader

1.0 1.0 0.0 1.28 MB

PHP script for downloading videos from youtube; also parsing youtube feed into RSS enclosures for podcatchers

License: GNU General Public License v2.0

PHP 98.50% JavaScript 1.30% CSS 0.15% Hack 0.06%

youtube-downloader-1's Introduction

YouTube Downloader

Author Source Code Software License Build Status Gitter

PHP Library with Web UI to download videos from YouTube.

Goals

  • Create a library that delivers data and download links for youtube videos.
  • Create a UI for downloading the videos.
  • Have no external dependencies to other services.
  • Have no external dependencies to other libraries in production.
  • Installation should be simple (unzip on server and go)

To achieve this goals this project contains two parts:

  1. A semantic versioning 2 following PHP library that delivers data and download links for youtube videos.
  2. A Web interface that uses this library

Support for Cipher signature

YouTube Downloader supports YouTube videos with a cipher signature too. ๐ŸŽ‰ Please note that this functionality is hidden behind a config flag because it downloads JavaScript code from a 3rd party (YouTube) server and interprets it. This MAY harm your server, if the 3rd party server delivers malicious code.

You can activate this by setting the enable_youtube_decipher_signature to true in /config/custom.php. If the file don't exists you can simple create it or copy from /config/default.php.

<?php
// in config/custom.php
return [
    'enable_youtube_decipher_signature' => true,
];

Requirements

You must fit at least this requirements to use YouTube-Downloader:

  • PHP >= 5.6
  • Web server (Apache/Nginx/PHP built-in)

Installation

There are multiple ways to set up YouTube-Downloader

ZIP Download

  1. Download the code for the newest release: https://github.com/jeckman/YouTube-Downloader/releases
  2. Unzip the code to your web server
  3. Open the folder with your browser

Git

  1. Clone the code on your server with

     git clone https://github.com/jeckman/YouTube-Downloader.git
    
  2. Checkout the latest release tag with

     git checkout $(git describe --abbrev=0 --tags)
    
  3. Open the folder with your browser

Composer

You can use the PHP library in your project by installing the code via Composer.

The library isn't available on packagist.org at the moment, so you must add the repository in your composer.json manually. Your composer.json should look like this

{
	"require": {
		"jeckman/YouTube-Downloader": "dev-master"
	},
	"repositories": [
		{"type": "vcs", "url": "https://github.com/jeckman/YouTube-Downloader"}
	]
}

Now install the dependencies with $ composer update

Note: Instead of using the master branch you should use a specific release like "jeckman/YouTube-Downloader": "0.XX". You can found all releases here.

Usage

You can manually visit a web form (the index.php file), enter a YouTube video id, and get in return a list of links showing the various formats in which that video can be downloaded. You can simply choose "save link as" or the equivalent to download the file.

Second, you can directly target the getvideo.php script, passing in a videoID and preferred format, and you will get redirected to the file itself.

http://example.com/yt/getvideo.mp4?videoid=GkvvH8pBoTg&format=ipad

Potential formats:

  • best = just give me the largest file / best quality
  • free = give the largest version including WebM, lower priority to FLV
  • ipad = ignore WebM and FLV, look for best MP4 file

You can also pass in a specific format number, if you know it.

Note this approach, because it redirects you to the file itself, currently bypasses the proxy option, so if your browser/server setup requires the proxy to work these will fail.

Feed subscription

You can subscribe both to YouTube channels and users via RSS. Feeds can be generated in the formats listed above.

Generating a feed for a YouTube channel works as follows:

http://example.com/yt/feed.php?channelid=UChELZ_JMGNYuxObfrXoER6A&format=best

To generate a feed for a YouTube user:

http://example.com/yt/feed.php?user=heisenewsticker&format=free

The generated feed is a standard RSS feed and can be subscribed to in any feed reader.

Upgrading

ZIP Download

  1. Backup your config file from config/custom.php.
  2. Delete all files in the project folder
  3. Download the newest release from https://github.com/jeckman/YouTube-Downloader/releases
  4. Unzip the code to your project folder
  5. Place your config file back to config/custom.php.

Git

Fetch the master branch and checkout the latest annotated tag.

git remote update
git fetch origin master
git checkout $(git describe --abbrev=0 --tags master)

Composer

Update your composer.json to use the latest version. Then run:

composer update

Contributing

You can help making this project better by reporting bugs or submitting pull requests. Please see our contributing guideline for more information.

youtube-downloader-1's People

Contributors

aganel avatar airesvsg avatar art4 avatar bellenottelling avatar bitnol avatar blagynchy avatar bpiec avatar cerdic avatar diloy93 avatar dmitriylyalyuev avatar dtdaft avatar eloydegen avatar ewwink avatar faisalmirza avatar falahati avatar hedii avatar itseasy21 avatar jeckman avatar knpau avatar kolahzary avatar madza91 avatar marwandesigner avatar mhama avatar muiton avatar projectcoredevs avatar roukmoute avatar sepehr avatar stefansarya avatar symera avatar yazdipour avatar

Stargazers

 avatar

Watchers

 avatar

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.