mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 00:16:48 +00:00
New downloads page for git
This commit is contained in:
parent
2840ae3a8f
commit
3bcc0a565c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
*.kate-swp
|
||||
|
||||
downloads/*
|
||||
|
6
Makefile
6
Makefile
@ -1,6 +0,0 @@
|
||||
update:
|
||||
python ./generate-download
|
||||
python ./update-copyright
|
||||
|
||||
.PHONY: update
|
||||
|
41
about.html
41
about.html
@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>About youtube-dl</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">About the program</td>
|
||||
</tr></table>
|
||||
|
||||
<h1>What is it?</h1>
|
||||
|
||||
<p><em>youtube-dl</em> is a small command-line program to download videos from YouTube.com and a few more sites. It requires the <a href="http://www.python.org/">Python interpreter</a>, version 2.6+ (Python 3 support is planned), and it is not platform specific. It should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like. The project is currently being developed at <a href="https://github.com/rg3/youtube-dl/"><strong>github</strong></a>.</p>
|
||||
|
||||
<h1>Authors</h1>
|
||||
|
||||
<ul>
|
||||
<li>Ricardo Garcia Gonzalez: program core, YouTube.com InfoExtractor, metacafe.com InfoExtractor and YouTube playlist InfoExtractor.</li>
|
||||
<li>Danny Colligan: YouTube search InfoExtractor, ideas and patches.</li>
|
||||
<li>Benjamin Johnson: Google Video InfoExtractor, Photobucket InfoExtractor, Yahoo! Video InfoExtractor, generic InfoExtractor, ideas, patches, etc.</li>
|
||||
<li>Vasyl' Vavrychuk: DepositFiles InfoExtractor, ideas and patches.</li>
|
||||
<li>Witold Baryluk: Dailymotion InfoExtractor.</li>
|
||||
<li>Paweł Paprota: YouTube user videos InfoExtractor.</li>
|
||||
<li>Gergely Imreh: Facebook InfoExtractor, ideas and patches.</li>
|
||||
<li>Philipp Hagemeister: Maintainer since 2011, InfoExtractors for blip.tv, thedailyshow/colbertnation, The Escapist</li>
|
||||
<li>Sören Schulze: myvideo InfoExtractor.</li>
|
||||
<li>Filippo Valsorda: Developer, Windows build, testing.</li>
|
||||
<li>Many other people contributing patches, code, ideas and kind messages. Too many to be listed here. You know who you are. Thank you very much.</li>
|
||||
</ul>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2012 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
@ -1,135 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl: Documentation</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">Documentation</td>
|
||||
</tr></table>
|
||||
|
||||
<div class="toc">
|
||||
<h1>Index</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#d1">Getting started</a></li>
|
||||
<li><a href="#d2">More usage tips</a></li>
|
||||
<li><a href="#d3">Frequently Asked Questions</a></li>
|
||||
<li><a href="#d4">Supported sites</a></li>
|
||||
<li><a href="#d5">Proxy support</a></li>
|
||||
<li><a href="#d6">YouTube formats</a></li>
|
||||
<li><a href="#d7">Output template</a></li>
|
||||
<li><a href="#d8">Configuration</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h1 id="d1">Getting started</h1>
|
||||
|
||||
<p>In Windows, once you have installed the Python interpreter, save the program with the <em>.py</em> extension and put it somewhere in the PATH. Try to follow the <a href="windows.html">guide to install youtube-dl under Windows</a>.</p>
|
||||
|
||||
<p>In Unix, download it, give it execution permission and copy it to one of the PATH directories (typically, <em>/usr/local/bin</em>).</p>
|
||||
|
||||
<p>After that, you should be able to call it from the command line as <em>youtube-dl</em> or <em>youtube-dl.py</em>. I will use <em>youtube-dl</em> in the following examples. Usage instructions are easy. Use <em>youtube-dl</em> followed by a video URL or identifier. Example: <em>youtube-dl "http://www.youtube.com/watch?v=foobar"</em>. The video will be saved to the file <em>foobar.flv</em> in that example. As YouTube.com videos are usually in Flash Video format, their extension should be <em>flv</em>. In Linux and other unices, video players using a recent version of <em>ffmpeg</em> can play them. That includes VLC, MPlayer, etc. Those two work under Windows and other platforms, but you could also get a specific FLV player of your taste.</p>
|
||||
|
||||
<p>If you try to run the program and you receive an error message containing the keyword <em>SyntaxError</em> near the end, it means your Python interpreter is too old or from the 3.x branch.</p>
|
||||
|
||||
<h1 id="d2">More usage tips</h1>
|
||||
|
||||
<p>The program is usually invoked as <em>youtube-dl</em> followed by options and the video URLs. Listing all the options here would make this text too long, so you can run <em>youtube-dl --help</em> and get a summary of them. From that point on you can start experimenting with the different options yourself. The most common ones are -t (or -l) to include the video title in the file name. Also, the -o option can specify the output file name and path. It allows special character sequences that can be used as templates to be replaced. See the "Output template" section for more details.</p>
|
||||
|
||||
<p>Some YouTube videos are served using Adobe's proprietary RTMP protocol, which imposes DRM restrictions and encrypts the connection. <em>youtube-dl</em> is not able to download these videos by itself. However, it will attempt to use the <a href="http://rtmpdump.mplayerhq.hu/">rtmpdump</a> program, if it's installed in your system, to download these videos.</p>
|
||||
|
||||
<h1 id="d3">Frequently Asked Questions</h1>
|
||||
|
||||
<p>The <a href="faq.html">Frequently Asked Questions</a> page contains answers to some common questions that pop up in my e-mail and in the <a href="https://github.com/rg3/youtube-dl/issues">issue tracker</a>. Be sure to check it before reporting problems.</p>
|
||||
|
||||
<h1 id="d4">Supported sites</h1>
|
||||
|
||||
<ul>
|
||||
<li>YouTube.com.</li>
|
||||
<li>YouTube.com playlists (playlist URLs in "view_play_list" form).</li>
|
||||
<li>YouTube.com searches, using the special keyword "ytsearch" as a form of URL, as in "ytsearch:cute kittens". Do not forget the quotes if you want to include spaces in your search. Other variants are "ytsearchN" to download more than the first result, with N being a number, and "ytsearchall".</li>
|
||||
<li>YouTube.com user videos, using user page URLs or the specifc "ytuser" keyword.</li>
|
||||
<li>metacafe.com.</li>
|
||||
<li>Google Video.</li>
|
||||
<li>Google Video searches ("gvsearch" keyword).</li>
|
||||
<li>Photobucket videos.</li>
|
||||
<!--
|
||||
Unsupported, see https://github.com/rg3/youtube-dl/issues/300
|
||||
<li>Yahoo! video.</li>
|
||||
<li>Yahoo! video searches ("ybsearch" keyword).</li>
|
||||
-->
|
||||
<li>Dailymotion.</li>
|
||||
<li>DepositFiles.</li>
|
||||
<li>blip.tv.</li>
|
||||
<li>vimeo.</li>
|
||||
<li>myvideo.de.</li>
|
||||
<li>The Daily Show / Colbert Nation.</li>
|
||||
<li>The Escapist.</li>
|
||||
<li>CollegeHumor.</li>
|
||||
<li>arte.tv.</li>
|
||||
<li>Soundcloud.</li>
|
||||
<li>xvideos.</li>
|
||||
<li>infoq.</li>
|
||||
<li>mixcloud.</li>
|
||||
<li>Stanford Open Content.</li>
|
||||
<li>Youku.</li>
|
||||
<li>MTV.</li>
|
||||
<li>XNXX.</li>
|
||||
<li>Google Plus.</li>
|
||||
<li>A generic downloader that works in some sites.</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
For a complete list, execute <code>youtube-dl --list-extractors</code>.
|
||||
</p>
|
||||
|
||||
<h1 id="d5">Proxy support</h1>
|
||||
|
||||
<p>youtube-dl supports downloading videos through a proxy, by setting the <em>http_proxy</em> environment variable to the proxy URL, as in <code>http://proxy_machine_name:port/</code>.</p>
|
||||
|
||||
<h1 id="d6">YouTube formats</h1>
|
||||
|
||||
<p>Using the -f option and other related options, you can specify the video format to be downloaded from YouTube. Instead of keeping a video format table here, I will refer you to the <a href="http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs">list of YouTube formats on Wikipedia</a>.</p>
|
||||
|
||||
<h1 id="d7">Output template</h1>
|
||||
|
||||
<p>The -o option allows users to indicate a template for the output file names. The basic usage is not to set any template arguments when downloading a single file, like in <em>youtube-dl -o funny_video.flv "http://some/video"</em>. However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format <strong>%(NAME)s</strong>. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:</p>
|
||||
|
||||
<ul>
|
||||
<li><em>id</em>: The sequence will be replaced by the video identifier.</li>
|
||||
<li><em>url</em>: The sequence will be replaced by the video URL.</li>
|
||||
<li><em>uploader</em>: The sequence will be replaced by the nickname of the person who uploaded the video.</li>
|
||||
<li><em>upload_date</em>: The sequence will be replaced by the upload date in YYYYMMDD format.</li>
|
||||
<li><em>title</em>: The sequence will be replaced by the video title.</li>
|
||||
<li><em>ext</em>: The sequence will be replaced by the appropriate extension (like <em>flv</em> or <em>mp4</em>).</li>
|
||||
<li><em>epoch</em>: The sequence will be replaced by the Unix epoch when creating the file.</li>
|
||||
<li><em>autonumber</em>: The sequence will be replaced by a five-digit number that will be increased with each download, starting at zero.</li>
|
||||
</ul>
|
||||
|
||||
<p>The current default template is <em>%(id)s.%(ext)s</em>, but that will be switchted to <em>%(title)s-%(id)s.%(ext)s</em> (which can be requested with <code>-t</code> at the moment).</p>
|
||||
|
||||
<p>In some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the <code>--restrict-filenames</code> flag to get a shorter title:</p>
|
||||
|
||||
<p><code style="white-space: pre;"><span style="color: #888;">$</span> youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc
|
||||
<span style="color: #004;">youtube-dl test video ''_ä↭𝕐.mp4</span> <span style="color: #666;"># All kinds of weird characters</span>
|
||||
<span style="color: #888;">$</span> youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc --restrict-filenames
|
||||
<span style="color: #004;">youtube-dl_test_video_.mp4</span> <span style="color: #666;"># A simple file name</span></code></p>
|
||||
|
||||
<h1 id="d8">Configuration</h1>
|
||||
|
||||
<p>
|
||||
You can configure youtube-dl by placing default arguments (such as <code>--extract-audio --no-mtime</code> to always extract the audio and not copy the mtime) into <code>/etc/youtube-dl.conf</code> and/or <code>~/.local/config/youtube-dl.conf</code>.
|
||||
</p>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2012 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl: Download Page</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">Download Page</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called <em>Save Target As</em> or <em>Save Link As</em>, depending on the web browser you are using.</p>
|
||||
|
||||
<p>Remember <em>youtube-dl</em> requires <a href="http://www.python.org/">Python</a> version 2.x (x being at least 6) to work.</p>
|
||||
|
||||
<h2><a href="https://github.com/downloads/rg3/youtube-dl/youtube-dl">2012.12.11</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><strong>MD5</strong>: a73e1d6f59e34d1231cf5788b31fa177</li>
|
||||
<li><strong>SHA1</strong>: aa45f8e32c637a2342674f32d1ca9e8f70bf695c</li>
|
||||
<li><strong>SHA256</strong>: e2109ac82b05f910828a12b2de0d8e5d3b29b0ed9e2daeb68badb1fce8c1ec7a</li>
|
||||
</ul>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2011 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl: Download Page</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">Download Page</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called <em>Save Target As</em> or <em>Save Link As</em>, depending on the web browser you are using.</p>
|
||||
|
||||
<p>Remember <em>youtube-dl</em> requires <a href="http://www.python.org/">Python</a> version 2.x (x being at least 6) to work.</p>
|
||||
|
||||
<h2><a href="@PROGRAM_URL@">@PROGRAM_VERSION@</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><strong>MD5</strong>: @PROGRAM_MD5SUM@</li>
|
||||
<li><strong>SHA1</strong>: @PROGRAM_SHA1SUM@</li>
|
||||
<li><strong>SHA256</strong>: @PROGRAM_SHA256SUM@</li>
|
||||
</ul>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2011 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
0
downloads/.git_dont_delete
Normal file
0
downloads/.git_dont_delete
Normal file
90
faq.html
90
faq.html
@ -1,90 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl: Frequently Asked Questions</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">Frequently Asked Questions</td>
|
||||
</tr></table>
|
||||
|
||||
<div class="toc">
|
||||
<h1>Questions</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#q-bugs">The program has stopped working / I want to suggest a feature.</a></li>
|
||||
<li><a href="#q-best-option">Can you please put the -b option back?</a></li>
|
||||
<li><a href="#q-http-402">I get HTTP error <code>402 Payment Required</code> when trying to download a video. What's this?</a></li>
|
||||
<li><a href="#q-play-video">I have downloaded a video but how can I play it?</a></li>
|
||||
<li><a href="#q-g-links">The links provided by youtube-dl -g are not working anymore</a></li>
|
||||
<li><a href="#q-no-fmt_url_map">ERROR: no fmt_url_map or conn information found in video info</a></li>
|
||||
<li><a href="#q-unable-to-download-video">ERROR: unable to download video</a></li>
|
||||
<li><a href="#q-syntax-error-non-ascii">SyntaxError:Non-ASCII character</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<h1 id="q-bugs">The program has stopped working / I want to suggest a feature.</h1>
|
||||
|
||||
<p>Please report the problem in the <a href="https://github.com/rg3/youtube-dl/issues">issuetracker</a>. Your bug report should include:</p>
|
||||
|
||||
<ul>
|
||||
<li>Your exact command line, like <code style="white-space: pre;">youtube-dl -t "http://www.youtube.com/watch?v=uHlDtZ6Oc3s&feature=channel_video_title"</code></li>
|
||||
<li>The output of <code>youtube-dl --version</code>. If you have made any changes, please provide it. In many cases, simply updating (with <code style="white-space: pre;">youtube-dl --update</code>) fixes the problem.</li>
|
||||
<li>The output of <code>python --version</code>. We support Python 2.6, 2.7, and 3.3+.</li>
|
||||
<li>The name and version of your Operating System ("Ubuntu 11.04 x64" or "Windows 7 x64" is usually enough).</li>
|
||||
</ul>
|
||||
|
||||
<p>If you're suggesting a feature, any details can help:</p>
|
||||
|
||||
<ul>
|
||||
<li>If it's an option: How would you call it? What should the help text be?</li>
|
||||
<li>If it's support for a new site: Mention an example video URL. If you can describe the download process, that's a huge plus. But don't worry if you can't - we love a good challenge ;).</li>
|
||||
<li>For programmers: Providing code that implements the change will speed up the integration process. <a href="https://github.com/rg3/youtube-dl/fork">Fork youtube-dl</a> on github, and <a href="http://help.github.com/send-pull-requests/">send us a pull request</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h1 id="q-best-option">Can you please put the -b option back?</h1>
|
||||
|
||||
<p>Most people asking this question are not aware that youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases, so you no longer need the -b option. For some specific videos, maybe YouTube does not report them to be available in a specific high quality format you're interested in. In that case, simply request it with the -f option and youtube-dl will try to download it.</p>
|
||||
|
||||
<h1 id="q-http-402">I get HTTP error <code>402 Payment Required</code> when trying to download a video. What's this?</h1>
|
||||
|
||||
<p>Apparently YouTube requires you to pass a CAPTCHA test if you download too much. At this moment, there is no plan to solve this issue, as youtube-dl is a command line program that is many times used without X and in an unattended fashion, so there's no easy way of solving this, in my humble opinion. I have no plans to solve it at this moment, but let me know your ideas and code if you come up with something.</p>
|
||||
|
||||
<h1 id="#q-play-video">I have downloaded a video but how can I play it?</h1>
|
||||
|
||||
<p>If you used youtube-dl to download a video and it wrote the video file to your hard drive, finishing with a completion message of 100%, the video is downloaded, so youtube-dl has finished its job and usually it's not to blame for problems that happen later. Not every video player supports FLV or MP4 files and every codec out there needed to play YouTube videos. In Linux, for example, I am generally pleased with <a href="http://www.mplayerhq.hu/">MPlayer</a>. In Windows, I tend to use <a href="http://www.videolan.org/">VLC</a>. Those usually work flawlessly.</p>
|
||||
|
||||
<h1 id="q-g-links">The links provided by youtube-dl -g are not working anymore</h1>
|
||||
|
||||
<p>Due to changes in YouTube, youtube-dl is now forced to provide the final video URL directly instead of the ones it used to provide, which were based on the "get_video" resource. The new URLs are real and work too, but they need to be used in combination with the <code>--cookies</code> option to be useful for external applications. <a href="https://github.com/rg3/youtube-dl/issues/closed#issue/41">Issue 41</a> in the issue tracker contains a bit more information about the problem.</p>
|
||||
|
||||
<h1 id="q-no-fmt_url_map">ERROR: no fmt_url_map or conn information found in video info</h1>
|
||||
|
||||
<p>youtube has switched to a new video info format in July 2011 which is not supported by old versions of youtube-dl. You can update youtube-dl with <code style="white-space:pre;">sudo youtube-dl --update</code> (or <code>python youtube-dl --update</code>).
|
||||
</p>
|
||||
|
||||
<h1 id="q-unable-to-download-video">ERROR: unable to download video</h1>
|
||||
|
||||
<p>youtube requires an additional signature since September 2012 which is not supported by old versions of youtube-dl. You can update youtube-dl with <code style="white-space:pre;">sudo youtube-dl --update</code> (or <code>python youtube-dl --update</code>).</p>
|
||||
|
||||
<h1 id="q-syntax-error-non-ascii">SyntaxError:Non-ASCII character</h1>
|
||||
|
||||
<p>The error
|
||||
|
||||
<code style="white-space:pre; display: block; margin: 1em 2em;">File "youtube-dl", line 2
|
||||
SyntaxError: Non-ASCII character '\x93' ...</code>
|
||||
|
||||
means you're using an outdated version of Python. Please update to Python 2.6 or 2.7.</p>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2012 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import hashlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import urllib.request
|
||||
|
||||
URL = 'https://github.com/downloads/rg3/youtube-dl/youtube-dl'
|
||||
|
||||
with tempfile.NamedTemporaryFile(suffix='youtube-dl', delete=True) as ytdl_file:
|
||||
with urllib.request.urlopen(URL) as dl:
|
||||
shutil.copyfileobj(dl, ytdl_file)
|
||||
|
||||
ytdl_file.seek(0)
|
||||
data = ytdl_file.read()
|
||||
|
||||
ytdl_file.flush()
|
||||
version = subprocess.check_output(['python3', ytdl_file.name, '--version']).decode('ascii').strip()
|
||||
|
||||
# Read template page
|
||||
with open('download.html.in', 'r', encoding='utf-8') as tmplf:
|
||||
template = tmplf.read()
|
||||
|
||||
md5sum = hashlib.md5(data).hexdigest()
|
||||
sha1sum = hashlib.sha1(data).hexdigest()
|
||||
sha256sum = hashlib.sha256(data).hexdigest()
|
||||
template = template.replace('@PROGRAM_VERSION@', version)
|
||||
template = template.replace('@PROGRAM_URL@', URL)
|
||||
template = template.replace('@PROGRAM_MD5SUM@', md5sum)
|
||||
template = template.replace('@PROGRAM_SHA1SUM@', sha1sum)
|
||||
template = template.replace('@PROGRAM_SHA256SUM@', sha256sum)
|
||||
with open('download.html', 'w', encoding='utf-8') as dlf:
|
||||
dlf.write(template)
|
BIN
gradient.png
BIN
gradient.png
Binary file not shown.
Before Width: | Height: | Size: 435 B |
BIN
gradient2.png
BIN
gradient2.png
Binary file not shown.
Before Width: | Height: | Size: 356 B |
BIN
gradient3.png
BIN
gradient3.png
Binary file not shown.
Before Width: | Height: | Size: 425 B |
BIN
gradient4.png
BIN
gradient4.png
Binary file not shown.
Before Width: | Height: | Size: 349 B |
BIN
gradient5.png
BIN
gradient5.png
Binary file not shown.
Before Width: | Height: | Size: 331 B |
36
index.html
36
index.html
@ -1,36 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">Download videos from YouTube.com
|
||||
<span style="font-size: x-small; font-weight: normal;">(and mores sites...)</span></td>
|
||||
</tr></table>
|
||||
|
||||
<p><em>youtube-dl</em> is a small command-line program to download videos from YouTube.com and a few more sites. It requires the <a href="http://www.python.org/">Python interpreter</a> (2.6, 2.7, or 3.3+), and it is not platform specific. It should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.</p>
|
||||
|
||||
<table border="0" id="rgb">
|
||||
<tr><td><a class="button" id="r" href="documentation.html">Documentation</a></td></tr>
|
||||
<tr><td><a class="button" id="g" href="download.html">Download</a></td></tr>
|
||||
<tr><td><a class="button" id="main-support" href="https://github.com/rg3/youtube-dl/issues/new">Support</a></td></tr>
|
||||
<tr><td><a class="button" id="y" href="https://github.com/rg3/youtube-dl/">Develop</a></td></tr>
|
||||
<tr><td><a class="button" id="b" href="about.html">About</a></td></tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
You can also contact us on the irc channel <a href="irc://chat.freenode.net/#youtube-dl">#youtube-dl</a>(<a href="http://webchat.freenode.net/?randomnick=1&channels=youtube-dl">webchat</a>) on freenode.
|
||||
</p>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2012 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
51
index.php
Normal file
51
index.php
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>youtube-dl downloads</h1>
|
||||
|
||||
<?php
|
||||
$DOWNLOAD_DIR = 'downloads';
|
||||
|
||||
$versions = array_filter(function($v) {return $v{0} != '.'}, scandir($DOWNLOAD_DIR));
|
||||
sort($versions);
|
||||
|
||||
$latest = end($versions);
|
||||
|
||||
echo '<div class="latest">';
|
||||
echo '<div>Latest (v' . htmlspecialchars($latest) . ') downloads:</div>';
|
||||
echo '<a href="' . htmlspecialchars($latest) . '/youtube-dl">youtube-dl</a> ';
|
||||
echo '<a href="' . htmlspecialchars($latest) . '/youtube-dl.exe">youtube-dl.exe</a> ';
|
||||
echo '<a href="' . htmlspecialchars($latest) . '/youtube-dl-src-' . htmlspecialchars($latest) . '.tar.gz">youtube-dl-src-' . htmlspecialchars($latest) . '.tar.gz</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<ul>';
|
||||
foreach ($versions as $v) {
|
||||
echo '<li><a href="' . htmlspecialchars($version) . '">' . htmlspecialchars($version) . '</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<table border="0" id="rgb" style="float: right;">
|
||||
<tr><td><a class="button" id="main-homepage" href="http://rg3.github.com/youtube-dl/">Homepage</a></td></tr>
|
||||
<tr><td><a class="button" id="g" href="http://rg3.github.com/youtube-dl/download.html">Download instructions</a></td></tr>
|
||||
<tr><td><a class="button" id="r" href="http://rg3.github.com/youtube-dl/documentation.html">Documentation</a></td></tr>
|
||||
<tr><td><a class="button" id="main-support" href="https://github.com/rg3/youtube-dl/issues/new">Support</a></td></tr>
|
||||
<tr><td><a class="button" id="y" href="https://github.com/rg3/youtube-dl/">Develop</a></td></tr>
|
||||
<tr><td><a class="button" id="b" href="http://rg3.github.com/youtube-dl/about.html">About</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2012 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
@ -136,6 +136,11 @@ tt {
|
||||
border: 2px solid #666600;
|
||||
}
|
||||
|
||||
#main-homepage {
|
||||
background-color: #848;
|
||||
border: 2px solid #808;
|
||||
|
||||
}
|
||||
#main-support {
|
||||
background-color: #448888;
|
||||
border: 2px solid #008888;
|
||||
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
import datetime
|
||||
import glob
|
||||
import io # For Python 2 compatibilty
|
||||
import os
|
||||
import re
|
||||
|
||||
year = str(datetime.datetime.now().year)
|
||||
for fn in glob.glob('*.html'):
|
||||
with io.open(fn, encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
newc = re.sub(ur'(?P<copyright>Copyright © 2006-)(?P<year>[0-9]{4})', u'Copyright © 2006-' + year, content)
|
||||
if content != newc:
|
||||
tmpFn = fn + '.part'
|
||||
with io.open(tmpFn, 'wt', encoding='utf-8') as outf:
|
||||
outf.write(newc)
|
||||
os.rename(tmpFn, fn)
|
23
windows.html
23
windows.html
@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
<title>youtube-dl under Windows</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table class="heading"><tr>
|
||||
<td class="title"><a href="index.html">youtube-dl</a></td>
|
||||
<td class="subtitle">Running it under Windows</td>
|
||||
</tr></table>
|
||||
|
||||
<p>We now provide an <em>experimental</em> Windows build. Simply <a href="https://github.com/rg3/youtube-dl/raw/master/youtube-dl.exe">download it here</a>, copy it to a location of your choosing, and run it in the command line.</p>
|
||||
|
||||
<div class="note">
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
|
||||
Copyright © 2006-2012 Ricardo Garcia Gonzalez</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user