From 3bcc0a565c0b03cf0c71fcec5787baa616863c86 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 12 Dec 2012 20:21:16 +0100 Subject: [PATCH] New downloads page for git --- .gitignore | 2 +- Makefile | 6 -- about.html | 41 ----------- documentation.html | 135 ------------------------------------- download.html | 33 --------- download.html.in | 33 --------- downloads/.git_dont_delete | 0 faq.html | 90 ------------------------- generate-download | 33 --------- gradient.png | Bin 435 -> 0 bytes gradient2.png | Bin 356 -> 0 bytes gradient3.png | Bin 425 -> 0 bytes gradient4.png | Bin 349 -> 0 bytes gradient5.png | Bin 331 -> 0 bytes index.html | 36 ---------- index.php | 51 ++++++++++++++ style.css | 5 ++ update-copyright | 21 ------ windows.html | 23 ------- 19 files changed, 57 insertions(+), 452 deletions(-) delete mode 100644 Makefile delete mode 100644 about.html delete mode 100644 documentation.html delete mode 100644 download.html delete mode 100644 download.html.in create mode 100644 downloads/.git_dont_delete delete mode 100644 faq.html delete mode 100755 generate-download delete mode 100644 gradient.png delete mode 100644 gradient2.png delete mode 100644 gradient3.png delete mode 100644 gradient4.png delete mode 100644 gradient5.png delete mode 100644 index.html create mode 100644 index.php delete mode 100644 update-copyright delete mode 100644 windows.html diff --git a/.gitignore b/.gitignore index 06c5e4aa9..4cb06562c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ *.kate-swp - +downloads/* diff --git a/Makefile b/Makefile deleted file mode 100644 index 71d211290..000000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -update: - python ./generate-download - python ./update-copyright - -.PHONY: update - diff --git a/about.html b/about.html deleted file mode 100644 index bb22c66d7..000000000 --- a/about.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -About youtube-dl - - - - - - - -
youtube-dlAbout the program
- -

What is it?

- -

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, 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 github.

- -

Authors

- - - -
- -Creative Commons License
-Copyright © 2006-2012 Ricardo Garcia Gonzalez
- - diff --git a/documentation.html b/documentation.html deleted file mode 100644 index 81da034fa..000000000 --- a/documentation.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - -youtube-dl: Documentation - - - - - - - -
youtube-dlDocumentation
- -
-

Index

- - -
- -

Getting started

- -

In Windows, once you have installed the Python interpreter, save the program with the .py extension and put it somewhere in the PATH. Try to follow the guide to install youtube-dl under Windows.

- -

In Unix, download it, give it execution permission and copy it to one of the PATH directories (typically, /usr/local/bin).

- -

After that, you should be able to call it from the command line as youtube-dl or youtube-dl.py. I will use youtube-dl in the following examples. Usage instructions are easy. Use youtube-dl followed by a video URL or identifier. Example: youtube-dl "http://www.youtube.com/watch?v=foobar". The video will be saved to the file foobar.flv in that example. As YouTube.com videos are usually in Flash Video format, their extension should be flv. In Linux and other unices, video players using a recent version of ffmpeg 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.

- -

If you try to run the program and you receive an error message containing the keyword SyntaxError near the end, it means your Python interpreter is too old or from the 3.x branch.

- -

More usage tips

- -

The program is usually invoked as youtube-dl followed by options and the video URLs. Listing all the options here would make this text too long, so you can run youtube-dl --help 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.

- -

Some YouTube videos are served using Adobe's proprietary RTMP protocol, which imposes DRM restrictions and encrypts the connection. youtube-dl is not able to download these videos by itself. However, it will attempt to use the rtmpdump program, if it's installed in your system, to download these videos.

- -

Frequently Asked Questions

- -

The Frequently Asked Questions page contains answers to some common questions that pop up in my e-mail and in the issue tracker. Be sure to check it before reporting problems.

- -

Supported sites

- - - -

-For a complete list, execute youtube-dl --list-extractors. -

- -

Proxy support

- -

youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in http://proxy_machine_name:port/.

- -

YouTube formats

- -

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 list of YouTube formats on Wikipedia.

- -

Output template

- -

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 youtube-dl -o funny_video.flv "http://some/video". However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format %(NAME)s. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:

- - - -

The current default template is %(id)s.%(ext)s, but that will be switchted to %(title)s-%(id)s.%(ext)s (which can be requested with -t at the moment).

- -

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 --restrict-filenames flag to get a shorter title:

- -

$ youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc -youtube-dl test video ''_ä↭𝕐.mp4    # All kinds of weird characters -$ youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc --restrict-filenames -youtube-dl_test_video_.mp4          # A simple file name

- -

Configuration

- -

-You can configure youtube-dl by placing default arguments (such as --extract-audio --no-mtime to always extract the audio and not copy the mtime) into /etc/youtube-dl.conf and/or ~/.local/config/youtube-dl.conf. -

- -
- -Creative Commons License
-Copyright © 2006-2012 Ricardo Garcia Gonzalez
- - diff --git a/download.html b/download.html deleted file mode 100644 index f7602c7fa..000000000 --- a/download.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - -youtube-dl: Download Page - - - - - - - -
youtube-dlDownload Page
- -

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 Save Target As or Save Link As, depending on the web browser you are using.

- -

Remember youtube-dl requires Python version 2.x (x being at least 6) to work.

- -

2012.12.11

- - - -
- -Creative Commons License
-Copyright © 2006-2011 Ricardo Garcia Gonzalez
- - diff --git a/download.html.in b/download.html.in deleted file mode 100644 index 386b8676e..000000000 --- a/download.html.in +++ /dev/null @@ -1,33 +0,0 @@ - - - - -youtube-dl: Download Page - - - - - - - -
youtube-dlDownload Page
- -

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 Save Target As or Save Link As, depending on the web browser you are using.

- -

Remember youtube-dl requires Python version 2.x (x being at least 6) to work.

- -

@PROGRAM_VERSION@

- - - -
- -Creative Commons License
-Copyright © 2006-2011 Ricardo Garcia Gonzalez
- - diff --git a/downloads/.git_dont_delete b/downloads/.git_dont_delete new file mode 100644 index 000000000..e69de29bb diff --git a/faq.html b/faq.html deleted file mode 100644 index 59490460d..000000000 --- a/faq.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -youtube-dl: Frequently Asked Questions - - - - - - - -
youtube-dlFrequently Asked Questions
- -
-

Questions

- - - -
- -

The program has stopped working / I want to suggest a feature.

- -

Please report the problem in the issuetracker. Your bug report should include:

- - - -

If you're suggesting a feature, any details can help:

- - - -

Can you please put the -b option back?

- -

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.

- -

I get HTTP error 402 Payment Required when trying to download a video. What's this?

- -

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.

- -

I have downloaded a video but how can I play it?

- -

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 MPlayer. In Windows, I tend to use VLC. Those usually work flawlessly.

- -

The links provided by youtube-dl -g are not working anymore

- -

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 --cookies option to be useful for external applications. Issue 41 in the issue tracker contains a bit more information about the problem.

- -

ERROR: no fmt_url_map or conn information found in video info

- -

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 sudo youtube-dl --update (or python youtube-dl --update). -

- -

ERROR: unable to download video

- -

youtube requires an additional signature since September 2012 which is not supported by old versions of youtube-dl. You can update youtube-dl with sudo youtube-dl --update (or python youtube-dl --update).

- -

SyntaxError:Non-ASCII character

- -

The error - -File "youtube-dl", line 2 -SyntaxError: Non-ASCII character '\x93' ... - -means you're using an outdated version of Python. Please update to Python 2.6 or 2.7.

- -
- -Creative Commons License
-Copyright © 2006-2012 Ricardo Garcia Gonzalez
- - diff --git a/generate-download b/generate-download deleted file mode 100755 index f19729f59..000000000 --- a/generate-download +++ /dev/null @@ -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) diff --git a/gradient.png b/gradient.png deleted file mode 100644 index 824f84d75d8b8da7277094ebfb5ac700aa198c44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 435 zcmV;k0ZjghP)Px#2XskIMF-jo5f(WixPy}`$g<#cd?~wwNwN4M= z#OZbB#4OhPTW~y|aG2J-GDnE1zC(yBAd}>q_ZK=lWtTU*|nv zb2T+lX18jUR}260{KW+Pz;*NK`ShL-HUDi*A1d#etG*v&od`={$PbK{W@`_9h2e~<2!UG|)weY$ss^vvJVb>af3 deT7}${R7Xth7?CO$yfjY002ovPDHLkV1iqL(!c-! diff --git a/gradient2.png b/gradient2.png deleted file mode 100644 index aebee76c25e1a297ddeea8de88c7b4094fd0f8f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 356 zcmV-q0h|7bP)Px#2XskIMF-jo5)=;tfCx>a0003CNkl}%Mk-H3_>5HfgO|$ZUXlQTq>|##94Xw|@m&~@Mll%axFMt0S%=9z>0000Px#2XskIMF-jo5)>8>Wx1FJ0003{NklfV7vZYN9 zF1u`b7@&dA=O=6eDFngsQV54d;PosNh7jc41ls={-(H%^^Ogb}pn0C#B?TVO4m{3l z#*j+u#?PZV>OS>n@fL-xz`Y~R#{Ik zEu8O7SPmUEhVQ(~glSsU%TtfG8jl)?kX`T611M~Vq@(}A2^!~?2d>`BqgK9?9a=v~ zPk!*z<65QXtb-p6+_;+>#lFcLT{<)Ot}z&BOuO-#HEX?jvAT1Xd=l8n(dd^~?tO+P zkDDJ=&5KvJZ_l_#22?#-^EPYgst>znGP&-(r@(PWZ~I}eG5a}VzUOA!Ia>227JIi@ zqtCC`ZWtOFUtgH1UE+OrCUfsR_=CI2kp5S*u^-hL+;+=-&pbKMYj^Z{ae#gSdTFm5 T&m{B+00000NkvXXu0mjf#^Jq& diff --git a/gradient4.png b/gradient4.png deleted file mode 100644 index 8227db35042afd8049ce9cb3393736240be95cdf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 349 zcmV-j0iyniP)Px#2XskIMF-jo5)>9J$KL6500035NklZ%~J406ER)Rqx=|B7qM#6A8N)iC@8aAT@xiZAWsHV zUkNdG53^C*h?p^Y9CL2VMxfi+Ks1RMb3%$lz}mHe;jA2#DZ(wiP)&u51x^c^y(T?^ z3zPx#2XskIMF-jo5*9Qvnde4X0002;Nkllf!_thg z!cNROFUy;>y$iR^yQy8ragU?6zPHP_@M-H)zPr0t&9JFY*8Dm%@dZ!uFEvbk8Xr{L zea?NBIdAl(#mO*JUno3{htKc$;9q$jnro;I*ECJ<5HEb(`K@XUyMO2DuBTUi;OGOP z*W|C4F22@x3tra@iPd;np?mjERL@PhHh!CY`nEsZ=LoL18gA dNW5u7rytq_bsX^ - - - -youtube-dl - - - - - - - -
youtube-dlDownload videos from YouTube.com - (and mores sites...)
- -

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter (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.

- - - - - - - -
Documentation
Download
Support
Develop
About
- -

-You can also contact us on the irc channel #youtube-dl(webchat) on freenode. -

- -
- -Creative Commons License
-Copyright © 2006-2012 Ricardo Garcia Gonzalez
- - diff --git a/index.php b/index.php new file mode 100644 index 000000000..0136af5b7 --- /dev/null +++ b/index.php @@ -0,0 +1,51 @@ + + + + +youtube-dl + + + + +

youtube-dl downloads

+ +'; +echo '
Latest (v' . htmlspecialchars($latest) . ') downloads:
'; +echo 'youtube-dl '; +echo 'youtube-dl.exe '; +echo 'youtube-dl-src-' . htmlspecialchars($latest) . '.tar.gz'; +echo ''; + +echo ''; + +?> + + + + + + + + + +
Homepage
Download instructions
Documentation
Support
Develop
About
+ +
+ +Creative Commons License
+Copyright © 2006-2012 Ricardo Garcia Gonzalez
+ + diff --git a/style.css b/style.css index fe6ddeb14..1b8fece55 100644 --- a/style.css +++ b/style.css @@ -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; diff --git a/update-copyright b/update-copyright deleted file mode 100644 index a37c4cada..000000000 --- a/update-copyright +++ /dev/null @@ -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'(?PCopyright © 2006-)(?P[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) diff --git a/windows.html b/windows.html deleted file mode 100644 index 49da3aa3a..000000000 --- a/windows.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - -youtube-dl under Windows - - - - - - - -
youtube-dlRunning it under Windows
- -

We now provide an experimental Windows build. Simply download it here, copy it to a location of your choosing, and run it in the command line.

- -
- -Creative Commons License
-Copyright © 2006-2012 Ricardo Garcia Gonzalez
- -