mirror of
https://gitlab.com/ytdl-org/youtube-dl.git
synced 2026-04-25 00:00:04 -04:00
Compare commits
72 Commits
2011.09.30
...
2011.12.18
| Author | SHA1 | Date | |
|---|---|---|---|
| d6639d05c2 | |||
| 633cf7cbad | |||
| a5647b79ce | |||
| ba5059dd66 | |||
| bb8abbbbae | |||
| 561504fffa | |||
| 23e6b8adc8 | |||
| 3e0ea7d07a | |||
| 94fd3201b2 | |||
| 0b3f3e1ad9 | |||
| a05d2a0c05 | |||
| 0b14e0b367 | |||
| 66e8777769 | |||
| 348486ced4 | |||
| f1f300e629 | |||
| dd17922afc | |||
| 40fd4cb86a | |||
| 9e9b75ae4d | |||
| 8abf76ddb9 | |||
| c95da745bc | |||
| 0cd235eef6 | |||
| 77315556f1 | |||
| c379c181e0 | |||
| 31a2ec2d88 | |||
| b88a52504e | |||
| a95567af99 | |||
| 849edab8ec | |||
| b158a1d946 | |||
| fa2672f9fc | |||
| 28e3614bc0 | |||
| 208e095f72 | |||
| 0ae7abe57c | |||
| dc0a294a73 | |||
| 468c99257c | |||
| af8e8d63f9 | |||
| e092418d8b | |||
| e33e3045c6 | |||
| cb6568bf21 | |||
| 235b3ba479 | |||
| 5b3330e0cf | |||
| aab771fbdf | |||
| 00f95a93f5 | |||
| 1724e7c461 | |||
| 3b98a5ddac | |||
| 8b59cc93d5 | |||
| c3e4e7c182 | |||
| 38348005b3 | |||
| 208c4b9128 | |||
| ec574c2c41 | |||
| 871be928a8 | |||
| b20d4f8626 | |||
| 073d7a5985 | |||
| 40306424b1 | |||
| ecb3bfe543 | |||
| abeac45abe | |||
| 0fca93ac60 | |||
| 857e5f329a | |||
| 053419cd24 | |||
| 99e207bab0 | |||
| 0067bbe7a7 | |||
| 45aa690868 | |||
| beb245e92f | |||
| c424df0d2f | |||
| 87929e4b35 | |||
| d76736fc5e | |||
| 0f9b77223e | |||
| 9f47175a40 | |||
| a1a8713aad | |||
| 6501a06d46 | |||
| 8d89fbae5a | |||
| 7a2cf5455c | |||
| 7125a7ca8b |
@@ -0,0 +1,3 @@
|
||||
*.pyc
|
||||
*.pyo
|
||||
*~
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2011.09.30
|
||||
2011.12.18
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
default: update
|
||||
|
||||
update: update-readme update-latest
|
||||
update: compile update-readme update-latest
|
||||
|
||||
update-latest:
|
||||
./youtube-dl --version > LATEST_VERSION
|
||||
./youtube-dl.dev --version > LATEST_VERSION
|
||||
|
||||
update-readme:
|
||||
@options=$$(COLUMNS=80 ./youtube-dl --help | sed -e '1,/.*General Options.*/ d' -e 's/^\W\{2\}\(\w\)/### \1/') && \
|
||||
@options=$$(COLUMNS=80 ./youtube-dl.dev --help | sed -e '1,/.*General Options.*/ d' -e 's/^\W\{2\}\(\w\)/### \1/') && \
|
||||
header=$$(sed -e '/.*## OPTIONS/,$$ d' README.md) && \
|
||||
footer=$$(sed -e '1,/.*## FAQ/ d' README.md) && \
|
||||
echo "$${header}" > README.md && \
|
||||
echo -e '\n## OPTIONS' >> README.md && \
|
||||
echo >> README.md && \
|
||||
echo '## OPTIONS' >> README.md && \
|
||||
echo "$${options}" >> README.md&& \
|
||||
echo -e '\n## FAQ' >> README.md && \
|
||||
echo >> README.md && \
|
||||
echo '## FAQ' >> README.md && \
|
||||
echo "$${footer}" >> README.md
|
||||
|
||||
compile:
|
||||
cp youtube_dl/__init__.py youtube-dl
|
||||
|
||||
|
||||
.PHONY: default update update-latest update-readme
|
||||
.PHONY: default compile update update-latest update-readme
|
||||
|
||||
@@ -28,6 +28,7 @@ which means you can modify it, redistribute it or use it however you like.
|
||||
sub-string)
|
||||
--reject-title REGEX skip download for matching titles (regex or
|
||||
caseless sub-string)
|
||||
--max-downloads NUMBER Abort after downloading NUMBER files
|
||||
|
||||
### Filesystem Options:
|
||||
-t, --title use title in file name
|
||||
@@ -36,8 +37,10 @@ which means you can modify it, redistribute it or use it however you like.
|
||||
-o, --output TEMPLATE output filename template. Use %(stitle)s to get the
|
||||
title, %(uploader)s for the uploader name,
|
||||
%(autonumber)s to get an automatically incremented
|
||||
number, %(ext)s for the filename extension, and %%
|
||||
for a literal percent
|
||||
number, %(ext)s for the filename extension,
|
||||
%(upload_date)s for the upload date (YYYYMMDD), and
|
||||
%% for a literal percent. Use - to output to
|
||||
stdout.
|
||||
-a, --batch-file FILE file containing URLs to download ('-' for stdin)
|
||||
-w, --no-overwrites do not overwrite files
|
||||
-c, --continue resume partially downloaded files
|
||||
@@ -67,6 +70,8 @@ which means you can modify it, redistribute it or use it however you like.
|
||||
### Video Format Options:
|
||||
-f, --format FORMAT video format code
|
||||
--all-formats download all available video formats
|
||||
--prefer-free-formats prefer free video formats unless a specific one is
|
||||
requested
|
||||
--max-quality FORMAT highest quality format to download
|
||||
-F, --list-formats list all available formats (currently youtube only)
|
||||
|
||||
@@ -78,7 +83,8 @@ which means you can modify it, redistribute it or use it however you like.
|
||||
### Post-processing Options:
|
||||
--extract-audio convert video files to audio-only files (requires
|
||||
ffmpeg and ffprobe)
|
||||
--audio-format FORMAT "best", "aac", "vorbis" or "mp3"; best by default
|
||||
--audio-format FORMAT "best", "aac", "vorbis", "mp3", "m4a", or "wav";
|
||||
best by default
|
||||
--audio-quality QUALITY ffmpeg audio bitrate specification, 128k by default
|
||||
-k, --keep-video keeps the video file on disk after the post-
|
||||
processing; the video is erased by default
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Various small unit tests
|
||||
|
||||
import os,sys
|
||||
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
import youtube_dl
|
||||
|
||||
def test_simplify_title():
|
||||
assert youtube_dl._simplify_title(u'abc') == u'abc'
|
||||
assert youtube_dl._simplify_title(u'abc_d-e') == u'abc_d-e'
|
||||
|
||||
assert youtube_dl._simplify_title(u'123') == u'123'
|
||||
|
||||
assert u'/' not in youtube_dl._simplify_title(u'abc/de')
|
||||
assert u'abc' in youtube_dl._simplify_title(u'abc/de')
|
||||
assert u'de' in youtube_dl._simplify_title(u'abc/de')
|
||||
assert u'/' not in youtube_dl._simplify_title(u'abc/de///')
|
||||
|
||||
assert u'\\' not in youtube_dl._simplify_title(u'abc\\de')
|
||||
assert u'abc' in youtube_dl._simplify_title(u'abc\\de')
|
||||
assert u'de' in youtube_dl._simplify_title(u'abc\\de')
|
||||
|
||||
assert youtube_dl._simplify_title(u'ä') == u'ä'
|
||||
assert youtube_dl._simplify_title(u'кириллица') == u'кириллица'
|
||||
|
||||
# Strip underlines
|
||||
assert youtube_dl._simplify_title(u'\'a_') == u'a'
|
||||
+759
-122
File diff suppressed because it is too large
Load Diff
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import youtube_dl
|
||||
|
||||
youtube_dl.main()
|
||||
Executable
+4516
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user