mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 20:37:46 +08:00
Readme and javascript generic search
This commit is contained in:
parent
7b117c3c34
commit
19a59ed26f
102
readme.md
Normal file
102
readme.md
Normal file
@ -0,0 +1,102 @@
|
||||
# youtube-dl
|
||||
|
||||
Allows you to download and transcode video from supported sites. Needs ffmpeg for transcoding to work.
|
||||
|
||||
## Supported sites
|
||||
|
||||
* Youtube
|
||||
* Metacafe
|
||||
* Dailymotion
|
||||
* Google
|
||||
* Photobucket
|
||||
* Yahoo
|
||||
* DepositFiles
|
||||
* Facebook
|
||||
* Sites with JW Player
|
||||
## Installation
|
||||
|
||||
$ sudo apt-get install ffmpeg # for Ubuntu
|
||||
$ sudo wget --no-check-certificate https://github.com/dz0ny/youtube-dl/raw/master/youtube-dl -O /usr/local/bin/youtube-dl && sudo chmod a+x /usr/local/bin/youtube-dl
|
||||
|
||||
## Usage
|
||||
$ youtube-dl [options] url...
|
||||
|
||||
Options:
|
||||
-h, --help print this help text and exit
|
||||
-v, --version print program version and exit
|
||||
-U, --update update this program to latest stable version
|
||||
-i, --ignore-errors continue on download errors
|
||||
-r LIMIT, --rate-limit=LIMIT
|
||||
download rate limit (e.g. 50k or 44.6m)
|
||||
-R RETRIES, --retries=RETRIES
|
||||
number of retries (default is 10)
|
||||
--playlist-start=NUMBER
|
||||
playlist video to start at (default is 1)
|
||||
--playlist-end=NUMBER
|
||||
playlist video to end at (default is last)
|
||||
--dump-user-agent display the current browser identification
|
||||
|
||||
Authentication Options:
|
||||
-u USERNAME, --username=USERNAME
|
||||
account username
|
||||
-p PASSWORD, --password=PASSWORD
|
||||
account password
|
||||
-n, --netrc use .netrc authentication data
|
||||
|
||||
Video Format Options:
|
||||
-f FORMAT, --format=FORMAT
|
||||
video format code
|
||||
--all-formats download all available video formats
|
||||
--max-quality=FORMAT
|
||||
highest quality format to download
|
||||
|
||||
Verbosity / Simulation Options:
|
||||
-q, --quiet activates quiet mode
|
||||
-s, --simulate do not download video
|
||||
-g, --get-url simulate, quiet but print URL
|
||||
-e, --get-title simulate, quiet but print title
|
||||
--get-thumbnail simulate, quiet but print thumbnail URL
|
||||
--get-description simulate, quiet but print video description
|
||||
--get-filename simulate, quiet but print output filename
|
||||
--no-progress do not print progress bar
|
||||
--console-title display progress in console titlebar
|
||||
|
||||
Filesystem Options:
|
||||
-t, --title use title in file name
|
||||
-l, --literal use literal title in file name
|
||||
-A, --auto-number number downloaded files starting from 00000
|
||||
-o TEMPLATE, --output=TEMPLATE
|
||||
output filename template
|
||||
-a FILE, --batch-file=FILE
|
||||
file containing URLs to download ('-' for stdin)
|
||||
-w, --no-overwrites
|
||||
do not overwrite files
|
||||
-c, --continue resume partially downloaded files
|
||||
--cookies=FILE file to dump cookie jar to
|
||||
--no-part do not use .part files
|
||||
--no-mtime do not use the Last-modified header to set the file
|
||||
modification time
|
||||
|
||||
Transcoding Options (uses ffmpeg):
|
||||
-T FILE_TYPE, --transcode_to=FILE_TYPE
|
||||
transcode to specific video or audio format (example:
|
||||
mp3 mp4 mov mkv)
|
||||
--transcode_extra=ARGS
|
||||
pass additional parameters to ffmpeg (example: -vcodec
|
||||
libx264 -vpre slow -vpre ipod640 -b 2048k -acodec
|
||||
libfaac -ab 96k)
|
||||
|
||||
# License
|
||||
|
||||
Public domain code
|
||||
|
||||
# Authors
|
||||
|
||||
* Ricardo Garcia Gonzalez
|
||||
* Danny Colligan
|
||||
* Benjamin Johnson
|
||||
* Vasyl' Vavrychuk
|
||||
* Witold Baryluk
|
||||
* Paweł Paprota
|
||||
* Gergely Imreh
|
||||
* Janez Troha
|
@ -1767,7 +1767,10 @@ class GenericIE(InfoExtractor):
|
||||
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
|
||||
if mobj is None:
|
||||
# Broaden the search a little bit
|
||||
mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
|
||||
mobj = re.search(r'[^A-Za-z0-9]?(?:file|source|video_url)=(http[^\'"&]*)', webpage)
|
||||
if mobj is None:
|
||||
# Search in javascript
|
||||
mobj = re.search(r'video_url.+(http[^\'"&]*)', webpage)
|
||||
if mobj is None:
|
||||
self._downloader.trouble(u'ERROR: Invalid URL: %s' % url)
|
||||
return
|
||||
@ -2930,7 +2933,7 @@ if __name__ == '__main__':
|
||||
fd.add_post_processor(transcoder)
|
||||
except PostProcessingError, err:
|
||||
sys.exit(err)
|
||||
|
||||
|
||||
# Update version
|
||||
if opts.update_self:
|
||||
update_self(fd, sys.argv[0])
|
||||
|
Loading…
x
Reference in New Issue
Block a user