Skip to content
This repository has been archived by the owner. It is now read-only.
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Video download project.

Build Status npm version FOSSA Status

Rank and dls

Read in Italian

View on Github

Created by Daniil Gentili.

This project is licensed under the terms of the AGPLv3 license.

The programs included in this project can be used to download videos from any generic site including the Italian Rai Television website (including rai replay and iframe videos), the italian Mediaset website (including iframes like the ones on the Witty TV website), the LA7 website, and the Dplay website. And thanks to youtube-dl now they support lots of other websites!

This project features:

Both the API and the web version use a database.

Web version

This project also features a web version.

web version

The source code of the page can be viewed here.

I used the following programs in the web version:

And used the following theme as a base:


You can incorporate this script in your website!
Just include jquery and the video-dl script with:

<script src=""></script>
<script src="//"></script>

Or install it using npm.

npm install video-dl

Here's a list of the functions and the usage instructions.

Video Download function.


video_dl(output, inputurl, dlsupport, messageoutput)


output: output html element for the video info and the download urls. Required.

example: #result.

inputurl: url of the video. Required.

example: $("input#urljs").val()

dlsupport: enables or disables the download attribute in the download links. Optional.

0 enables, anything disables.

messageoutput: output html element for the contact module. Optional.

example: #message


video_dl("#result", $("input#urljs").val(), "0", "#message");

Let's say the input#urljs text field has value "".

The function will get the value of the input#urljs element, get the download links from the API, and return the following output to the #result element:

<h1 style="font-style: italic;">Video download script.</h1><br><h2 style="font-style: italic;">Created by <a href="">Daniil Gentili</a></h2><br><h1>Title:</h1> <h2>26 - Il potere degli animali fatati - Winx Club VII del 03/10/2015</h2><br><h1>Available versions:</h1><br><h2><a href="" download="26_Il_potere_degli_animali_fatati_Winx_Club_VII_del_03102015.mp4">Normal quality (mp4, 267 MiB, 720x404)</a><br></h2>

The function will then start the mailtext function with the following parameters:
mailtext(messageoutput, inputurl);

See mailtext description for the result.

First load function.

Use to output supported websites list, prepare mail message and, only on the website, hide the php submit module and use javascript engine instead.


firstload(supportedurls, separatorstart, separatorend, messageoutput, videodaniilit)  


supportedurls: output html element for the supported websites list. Required.

Example: #supportedurls.

separatorstart: first separator for the supported urls list: it will be put before every item in the supported websites list, if empty defaults to <br>.

Optional, recommended.
Example: <li>

separatorend: the second separator for the supported urls list: it will be put after every url, if empty defaults to <br>. Optional, recommended.

Example: </li>

messageoutput: output html element for default contact module text. Optional, recommended.

Example: #contact

videodaniilit: If on hides php module and unhides javascript text field. Do not use.


firstload("#supportedurls", "<li>", "</li>", "#message");  

Let's say the url list is: a b c d.

Output printed to #supportedurls is:

<li>a</li><li>b</li><li>c</li><li>d</li><a href="" target="_blank">&#9786;</a></li>

This will also create the default contact module text with


Contact module function.

Prints a nice message to the contact module text field, with the url if it's provided else just With insert link.


mailtext(output, url)  


output: html element where to print out the contact message. Required.

Example: #contact

url: url of the video to insert into the message. Not required, if not provided defaults to insert link.


mailtext("#contact", "");  

Will put

The video:
does not download, could you please fix it

to #contact.

Bash script.

Bash script usage: [ -qabp=player ] URL URL2 URL3 ... [ -qabfp=player ] URLS.txt URLS2.txt URLS3.txt ...

Do not forget to put the URL between quotes if it contains special chars like & or #.

Run with ./ if you installed in a directory not in $PATH.


-q              Quiet mode: useful for crontab jobs, automatically enables -a.

-a              Automatic mode: automatically download the video in the maximum quality.

-b              Use built-in API engine: requires additional programs and may not work properly on some systems but may be faster than the API server.

-f              Read URL(s) from specified text file(s). If specified, you cannot provide URLs as arguments.

-p=player       Play the video instead of downloading it using specified player, mplayer if none specified.

--help          Show this extremely helpful message.

Bash script installation instructions:

Debian-derived distros (Ubuntu, Linux mint, Bodhi Linux, etc.)

On debian-derived distros, execute this command to add my repo to your system:

sudo wget -q -O /etc/apt/sources.list.d/daniil.list && wget -q -O - | sudo apt-key add - && sudo apt-key adv --recv-keys --keyserver 72B97FD1D9672C93 && sudo apt-get update

You should see an OK if the operation was successful.

And this command to install the script.

sudo apt-get update; sudo apt-get -y install video-dl

Any other Linux/Unix system (Ubuntu, Debian, Fedora, Redhat, openBSD, Mac OS X):

Execute this command to install the script:

wget -O || curl -L -o; chmod +x

Run with ./ in the directory where you downloaded it.

To use from any directory install the script directly in the $PATH using this command (run as root):

wget -O /usr/bin/ || curl -L -o; chmod +x /usr/bin/

Now you can run it with in any directory.


Method 1 (app).

Enable unknown sources and install this app. Once opened you will be presented with a user friendly interface similar to the web version.


1: initial version

1.2: added not working, share and credits button

1.2.1: added external sharing option, fixed bugs

1.2.2: Fixed not working button on external share URL, added google analytics, fixed Rai Replay on external share.

1.3: Added auto update.

1.4: Added more credits.


You tell me!

Method 2 (script).

Install Busybox, Jackpal's Terminal emulator and Bash on rooted devices or Busybox no root if your device isn't rooted.

Video tutorial

Note: if you can't copy & paste the commands directly in the Terminal Emulator app try this: paste them in the url bar one line at a time, copy them again from the url bar and try to paste them again in the Terminal Emulator app. Run these commands:

cd /sdcard && wget 

Run with:

bash /sdcard/

To install the script directly in the $PATH use these commands (here, root is mandatory).

mount -o rw,remount /system && wget -O /system/bin/ && chmod 755 /system/bin/

If you cannot execute the script match the its shebang (the #!) to the location of the bash executable.


Jailbreak your device, add the following repo to Cydia,

... and install mobileterminal and video-dl.

Run with in mobileterminal.

To view and import the downloaded video to the gallery use iFile or Filza.


Install Cygwin (don't forget to install wget and sed during the installation process!), open its command prompt and type:

wget -O && chmod +x

Run with ./ in the directory where you downloaded it.

To run the script from any directory run the following commands:

cd /bin && wget -O && chmod +x && cd $OLDPWD


This project also features an API.

The source code of the API can be viewed here.

The API uses youtube-dl to get the links for non Rai/mediaset/la7/dplay/wittytv videos.

The API supports GET requests and the endpoint is (supports https).

Supported parameters:


The value should be the percent-encoded URL of the video to download. The response will be a list of URLS with the corresponding quality name, format, size and dimension.



Winx_Club_VI_Ep3_Il_collegio_volante Winx Club VI - Ep.3: Il collegio volante
Highest quality (mp4, 286MB, 1024x576)
Medium-low quality (mp4, 131MB, 700x394)


Winx_Club_VI_Ep3_Il_collegio_volante Winx Club VI - Ep.3: Il collegio volante

Sanitized name of video for file name Original name of the video for printing to user output

Highest quality (mp4, 286MB, 1024x576)

Quality name (format, size, dimension) URL of the video

Medium-low quality (mp4, 131MB, 700x394)

Quality name (format, size, dimension) URL of the video

The qualities are ordered in decreasing order by dimension.


Supports the following values:


returns a shortened list of supported websites.


returns a full list of supported websites.


If you created a program that uses this API contact me and I will put it on this page!

That's it!


Daniil Gentili


FOSSA Status

You can’t perform that action at this time.