diff --git a/.github/ISSUE_TEMPLATE/1_broken_site.md b/.github/ISSUE_TEMPLATE/1_broken_site.md index 32c14aa85..afaf91b23 100644 --- a/.github/ISSUE_TEMPLATE/1_broken_site.md +++ b/.github/ISSUE_TEMPLATE/1_broken_site.md @@ -21,15 +21,15 @@ assignees: '' - [ ] I'm reporting a broken site support -- [ ] I've verified that I'm running youtube-dlc version **2020.10.31** +- [ ] I've verified that I'm running youtube-dlc version **2021.01.07** - [ ] I've checked that all provided URLs are alive and playable in a browser - [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [ ] I've searched the bugtracker for similar issues including closed ones @@ -44,7 +44,7 @@ Add the `-v` flag to your command line you run youtube-dlc with (`youtube-dlc -v [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 - [debug] youtube-dlc version 2020.10.31 + [debug] youtube-dlc version 2021.01.07 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} @@ -53,7 +53,11 @@ Add the `-v` flag to your command line you run youtube-dlc with (`youtube-dlc -v ``` PASTE VERBOSE LOG HERE + ``` + ## Description diff --git a/.github/ISSUE_TEMPLATE/2_site_support_request.md b/.github/ISSUE_TEMPLATE/2_site_support_request.md index fe1aade05..b0fe8237d 100644 --- a/.github/ISSUE_TEMPLATE/2_site_support_request.md +++ b/.github/ISSUE_TEMPLATE/2_site_support_request.md @@ -21,15 +21,15 @@ assignees: '' - [ ] I'm reporting a new site support request -- [ ] I've verified that I'm running youtube-dlcc version **2020.10.31** +- [ ] I've verified that I'm running youtube-dlc version **2021.01.07** - [ ] I've checked that all provided URLs are alive and playable in a browser - [ ] I've checked that none of provided URLs violate any copyrights - [ ] I've searched the bugtracker for similar site support requests including closed ones diff --git a/.github/ISSUE_TEMPLATE/3_site_feature_request.md b/.github/ISSUE_TEMPLATE/3_site_feature_request.md index cddb81dda..102b10f72 100644 --- a/.github/ISSUE_TEMPLATE/3_site_feature_request.md +++ b/.github/ISSUE_TEMPLATE/3_site_feature_request.md @@ -21,20 +21,20 @@ assignees: '' - [ ] I'm reporting a site feature request -- [ ] I've verified that I'm running youtube-dlc version **2020.10.31** +- [ ] I've verified that I'm running youtube-dlc version **2021.01.07** - [ ] I've searched the bugtracker for similar site feature requests including closed ones ## Description WRITE DESCRIPTION HERE diff --git a/.github/ISSUE_TEMPLATE/4_bug_report.md b/.github/ISSUE_TEMPLATE/4_bug_report.md index 920ae8dbc..07dc21904 100644 --- a/.github/ISSUE_TEMPLATE/4_bug_report.md +++ b/.github/ISSUE_TEMPLATE/4_bug_report.md @@ -21,16 +21,16 @@ assignees: '' - [ ] I'm reporting a broken site support issue -- [ ] I've verified that I'm running youtube-dlc version **2020.10.31** +- [ ] I've verified that I'm running youtube-dlc version **2021.01.07** - [ ] I've checked that all provided URLs are alive and playable in a browser - [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [ ] I've searched the bugtracker for similar bug reports including closed ones @@ -46,7 +46,7 @@ Add the `-v` flag to your command line you run youtube-dlc with (`youtube-dlc -v [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 - [debug] youtube-dlc version 2020.10.31 + [debug] youtube-dlc version 2021.01.07 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} @@ -55,13 +55,17 @@ Add the `-v` flag to your command line you run youtube-dlc with (`youtube-dlc -v ``` PASTE VERBOSE LOG HERE + ``` + ## Description diff --git a/.github/ISSUE_TEMPLATE/5_feature_request.md b/.github/ISSUE_TEMPLATE/5_feature_request.md index 7cc390f58..dcda74b60 100644 --- a/.github/ISSUE_TEMPLATE/5_feature_request.md +++ b/.github/ISSUE_TEMPLATE/5_feature_request.md @@ -21,20 +21,20 @@ assignees: '' - [ ] I'm reporting a feature request -- [ ] I've verified that I'm running youtube-dlc version **2020.10.31** +- [ ] I've verified that I'm running youtube-dlc version **2021.01.07** - [ ] I've searched the bugtracker for similar feature requests including closed ones ## Description WRITE DESCRIPTION HERE diff --git a/.github/ISSUE_TEMPLATE/6_question.md b/.github/ISSUE_TEMPLATE/6_question.md index 3c3ae0f3b..647eb2d0c 100644 --- a/.github/ISSUE_TEMPLATE/6_question.md +++ b/.github/ISSUE_TEMPLATE/6_question.md @@ -23,7 +23,7 @@ assignees: '' Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - Look through the README (https://github.com/blackjack4494/yt-dlc) and FAQ (https://github.com/blackjack4494/yt-dlc) for similar questions - Search the bugtracker for similar questions: https://github.com/blackjack4494/yt-dlc -- Finally, put x into all relevant boxes (like this [x]) +- Finally, put x into all relevant boxes like this [x] (Dont forget to delete the empty space) --> - [ ] I'm asking a question diff --git a/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md b/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md index 3fe4d6968..6df9124c3 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md +++ b/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md @@ -1,7 +1,10 @@ --- name: Broken site support about: Report broken or misfunctioning site -title: '' +title: "[Broken]" +labels: Broken +assignees: '' + --- - [ ] I'm reporting a broken site support @@ -50,7 +53,11 @@ Add the `-v` flag to your command line you run youtube-dlc with (`youtube-dlc -v ``` PASTE VERBOSE LOG HERE + ``` + ## Description diff --git a/.github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md b/.github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md index aad8fa054..3844e0295 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md +++ b/.github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md @@ -1,8 +1,10 @@ --- name: Site support request about: Request support for a new site -title: '' -labels: 'site-support-request' +title: "[Site Request]" +labels: Request +assignees: '' + --- - [ ] I'm reporting a new site support request diff --git a/.github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md b/.github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md index 2fb82f828..dff7547af 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md +++ b/.github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md @@ -1,7 +1,10 @@ --- name: Site feature request about: Request a new functionality for a site -title: '' +title: "[Site Request]" +labels: Request +assignees: '' + --- - [ ] I'm reporting a site feature request diff --git a/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md b/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md index b7bebf8ab..90439f3d9 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md +++ b/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md @@ -2,6 +2,9 @@ name: Bug report about: Report a bug unrelated to any particular site or extractor title: '' +labels: '' +assignees: '' + --- - [ ] I'm reporting a broken site support issue @@ -52,7 +55,11 @@ Add the `-v` flag to your command line you run youtube-dlc with (`youtube-dlc -v ``` PASTE VERBOSE LOG HERE + ``` + ## Description diff --git a/.github/ISSUE_TEMPLATE_tmpl/5_feature_request.md b/.github/ISSUE_TEMPLATE_tmpl/5_feature_request.md index 99592f79d..50bbf6091 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/5_feature_request.md +++ b/.github/ISSUE_TEMPLATE_tmpl/5_feature_request.md @@ -1,8 +1,10 @@ --- name: Feature request about: Request a new functionality unrelated to any particular site or extractor -title: '' -labels: 'request' +title: "[Feature Request]" +labels: Request +assignees: '' + --- - [ ] I'm reporting a feature request diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e69b907d8..fa06e65b9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,7 @@ ### Before submitting a *pull request* make sure you have: - [ ] At least skimmed through [adding new extractor tutorial](https://github.com/ytdl-org/youtube-dl#adding-support-for-a-new-site) and [youtube-dl coding conventions](https://github.com/ytdl-org/youtube-dl#youtube-dl-coding-conventions) sections -- [ ] [Searched](https://github.com/ytdl-org/youtube-dl/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests +- [ ] [Searched](https://github.com/pukkandan/yt-dlc/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests - [ ] Checked the code with [flake8](https://pypi.python.org/pypi/flake8) ### In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd6a95256..828c2b0d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,18 +58,18 @@ jobs: env: SHA2: ${{ hashFiles('youtube-dlc') }} run: echo "::set-output name=sha2_unix::$SHA2" - - name: Install dependencies for pypi - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - rm -rf dist/* - python setup.py sdist bdist_wheel - twine upload dist/* + # - name: Install dependencies for pypi + # run: | + # python -m pip install --upgrade pip + # pip install setuptools wheel twine + # - name: Build and publish + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # run: | + # rm -rf dist/* + # python setup.py sdist bdist_wheel + # twine upload dist/* build_windows: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..6e48f9192 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,75 @@ +name: CI +on: [push] +jobs: + tests: + name: Tests + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + # TODO: python 2.6 + # 3.3, 3.4 are not running + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy-2.7, pypy-3.6, pypy-3.7] + python-impl: [cpython] + ytdl-test-set: [core, download] + run-tests-ext: [sh] + include: + # python 3.2 is only available on windows via setup-python + - os: windows-latest + python-version: 3.2 + python-impl: cpython + ytdl-test-set: core + run-tests-ext: bat + - os: windows-latest + python-version: 3.2 + python-impl: cpython + ytdl-test-set: download + run-tests-ext: bat + # jython + - os: ubuntu-latest + python-impl: jython + ytdl-test-set: core + run-tests-ext: sh + - os: ubuntu-latest + python-impl: jython + ytdl-test-set: download + run-tests-ext: sh + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + if: ${{ matrix.python-impl == 'cpython' }} + with: + python-version: ${{ matrix.python-version }} + - name: Set up Java 8 + if: ${{ matrix.python-impl == 'jython' }} + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Install Jython + if: ${{ matrix.python-impl == 'jython' }} + run: | + wget http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar -O jython-installer.jar + java -jar jython-installer.jar -s -d "$HOME/jython" + echo "$HOME/jython/bin" >> $GITHUB_PATH + - name: Install nose + run: pip install nose + - name: Run tests + continue-on-error: ${{ matrix.ytdl-test-set == 'download' || matrix.python-impl == 'jython' }} + env: + YTDL_TEST_SET: ${{ matrix.ytdl-test-set }} + run: ./devscripts/run_tests.${{ matrix.run-tests-ext }} + flake8: + name: Linter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install flake8 + run: pip install flake8 + - name: Run flake8 + run: flake8 . \ No newline at end of file diff --git a/.gitignore b/.gitignore index 065a14f49..093d4f2ed 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ py2exe.log *.kate-swp build/ dist/ +zip/ MANIFEST README.txt youtube-dl.1 @@ -46,6 +47,7 @@ updates_key.pem *.part *.ytdl *.swp +*.spec test/local_parameters.json .tox youtube-dl.zsh @@ -62,3 +64,5 @@ venv/ .vscode cookies.txt + +*.sublime-workspace \ No newline at end of file diff --git a/.travis.yml b/.travis.yml.disabled similarity index 100% rename from .travis.yml rename to .travis.yml.disabled diff --git a/AUTHORS-Fork b/AUTHORS-Fork new file mode 100644 index 000000000..e14714348 --- /dev/null +++ b/AUTHORS-Fork @@ -0,0 +1,3 @@ +pukkandan +h-h-h-h +pauldubois98 \ No newline at end of file diff --git a/Makefile b/Makefile index 9588657c1..384f384ed 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -all: youtube-dlc README.md CONTRIBUTING.md README.txt youtube-dlc.1 youtube-dlc.bash-completion youtube-dlc.zsh youtube-dlc.fish supportedsites +all: youtube-dlc README.md CONTRIBUTING.md README.txt issuetemplates youtube-dlc.1 youtube-dlc.bash-completion youtube-dlc.zsh youtube-dlc.fish supportedsites +doc: youtube-dlc README.md CONTRIBUTING.md issuetemplates supportedsites clean: rm -rf youtube-dlc.1.temp.md youtube-dlc.1 youtube-dlc.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dlc.tar.gz youtube-dlc.zsh youtube-dlc.fish youtube_dlc/extractor/lazy_extractors.py *.dump *.part* *.ytdl *.info.json *.mp4 *.m4a *.flv *.mp3 *.avi *.mkv *.webm *.3gp *.wav *.ape *.swf *.jpg *.png CONTRIBUTING.md.tmp youtube-dlc youtube-dlc.exe diff --git a/README.md b/README.md index 170c85c48..8a7e1b6db 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,100 @@ -[![Build Status](https://travis-ci.com/blackjack4494/yt-dlc.svg?branch=master)](https://travis-ci.com/blackjack4494/yt-dlc) -[![PyPi](https://img.shields.io/pypi/v/youtube-dlc.svg)](https://pypi.org/project/youtube-dlc) - -[![Gitter chat](https://img.shields.io/gitter/room/youtube-dlc/community)](https://gitter.im/youtube-dlc) -[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](https://github.com/blackjack4494/yt-dlc/blob/master/LICENSE) - -youtube-dlc - download videos from youtube.com or other video platforms. - -youtube-dlc is a fork of youtube-dl with the intention of getting features tested by the community merged in the tool faster, since youtube-dl's development seems to be slowing down. (https://web.archive.org/web/20201014194602/https://github.com/ytdl-org/youtube-dl/issues/26462) - -- [INSTALLATION](#installation) -- [UPDATE](#update) -- [DESCRIPTION](#description) -- [OPTIONS](#options) - - [Network Options:](#network-options) - - [Geo Restriction:](#geo-restriction) - - [Video Selection:](#video-selection) - - [Download Options:](#download-options) - - [Filesystem Options:](#filesystem-options) - - [Thumbnail images:](#thumbnail-images) - - [Verbosity / Simulation Options:](#verbosity--simulation-options) - - [Workarounds:](#workarounds) - - [Video Format Options:](#video-format-options) - - [Subtitle Options:](#subtitle-options) - - [Authentication Options:](#authentication-options) - - [Adobe Pass Options:](#adobe-pass-options) - - [Post-processing Options:](#post-processing-options) - - [Extractor Options:](#extractor-options) -- [CONFIGURATION](#configuration) - - [Authentication with `.netrc` file](#authentication-with-netrc-file) -- [OUTPUT TEMPLATE](#output-template) - - [Output template and Windows batch files](#output-template-and-windows-batch-files) - - [Output template examples](#output-template-examples) -- [FORMAT SELECTION](#format-selection) - - [Format selection examples](#format-selection-examples) -- [VIDEO SELECTION](#video-selection-1) +[![Build Status](https://github.com/pukkandan/yt-dlc/workflows/CI/badge.svg)](https://github.com/pukkandan/yt-dlc/actions?query=workflow%3ACI) +[![Release Version](https://img.shields.io/badge/Release-2021.01.07-brightgreen)](https://github.com/pukkandan/yt-dlc/releases/latest) +[![License: Unlicense](https://img.shields.io/badge/License-Unlicense-blue.svg)](https://github.com/pukkandan/yt-dlc/blob/master/LICENSE) + +youtube-dlc - download videos from youtube.com and many other [video platforms](docs/supportedsites.md) + +This is a fork of [youtube-dlc](https://github.com/blackjack4494/yt-dlc) which is inturn a fork of [youtube-dl](https://github.com/ytdl-org/youtube-dl) + +* [CHANGES FROM YOUTUBE-DLC](#changes) +* [INSTALLATION](#installation) + * [UPDATE](#update) + * [COMPILE](#compile) +* [YOUTUBE-DLC](#youtube-dlc) +* [DESCRIPTION](#description) +* [OPTIONS](#options) + * [Network Options](#network-options) + * [Geo Restriction](#geo-restriction) + * [Video Selection](#video-selection) + * [Download Options](#download-options) + * [Filesystem Options](#filesystem-options) + * [Thumbnail images](#thumbnail-images) + * [Internet Shortcut Options](#internet-shortcut-options) + * [Verbosity / Simulation Options](#verbosity--simulation-options) + * [Workarounds](#workarounds) + * [Video Format Options](#video-format-options) + * [Subtitle Options](#subtitle-options) + * [Authentication Options](#authentication-options) + * [Adobe Pass Options](#adobe-pass-options) + * [Post-processing Options](#post-processing-options) + * [SponSkrub Options (SponsorBlock)](#sponskrub-options-sponsorblock) + * [Extractor Options](#extractor-options) +* [CONFIGURATION](#configuration) + * [Authentication with .netrc file](#authentication-with-netrc-file) +* [OUTPUT TEMPLATE](#output-template) + * [Output template and Windows batch files](#output-template-and-windows-batch-files) + * [Output template examples](#output-template-examples) +* [FORMAT SELECTION](#format-selection) + * [Filtering Formats](#filtering-formats) + * [Sorting Formats](#sorting-formats) + * [Format Selection examples](#format-selection-examples) +* [VIDEO SELECTION](#video-selection-1) +* [MORE](#more) + + +# CHANGES +See [commits](https://github.com/pukkandan/yt-dlc/commits) for more details + +### 2021.01.05 +* **Format Sort:** Added `--format-sort` (`-S`), `--format-sort-force` (`--S-force`) - See [Sorting Formats](#sorting-formats) for details +* **Format Selection:** See [Format Selection](#format-selection) for details + * New format selectors: `best*`, `worst*`, `bestvideo*`, `bestaudio*`, `worstvideo*`, `worstaudio*` + * Changed video format sorting to show video only files and video+audio files together. + * Added `--video-multistreams`, `--no-video-multistreams`, `--audio-multistreams`, `--no-audio-multistreams` + * Added `b`,`w`,`v`,`a` as alias for `best`, `worst`, `video` and `audio` respectively +* **Shortcut Options:** Added `--write-link`, `--write-url-link`, `--write-webloc-link`, `--write-desktop-link` by @h-h-h-h - See [Internet Shortcut Options](#internet-shortcut-options) for details +* **Sponskrub integration:** Added `--sponskrub`, `--sponskrub-cut`, `--sponskrub-force`, `--sponskrub-location`, `--sponskrub-args` - See [SponSkrub Options](#sponskrub-options-sponsorblock) for details +* Added `--force-download-archive` (`--force-write-archive`) by by h-h-h-h +* Added `--list-formats-as-table`, `--list-formats-old` +* **Negative Options:** Makes it possible to negate boolean options by adding a `no-` to the switch + * Added `--no-ignore-dynamic-mpd`, `--no-allow-dynamic-mpd`, `--allow-dynamic-mpd`, `--youtube-include-hls-manifest`, `--no-youtube-include-hls-manifest`, `--no-youtube-skip-hls-manifest`, `--no-download`, `--no-download-archive`, `--resize-buffer`, `--part`, `--mtime`, `--no-keep-fragments`, `--no-cookies`, `--no-write-annotations`, `--no-write-info-json`, `--no-write-description`, `--no-write-thumbnail`, `--youtube-include-dash-manifest`, `--post-overwrites`, `--no-keep-video`, `--no-embed-subs`, `--no-embed-thumbnail`, `--no-add-metadata`, `--no-include-ads`, `--no-write-sub`, `--no-write-auto-sub`, `--no-playlist-reverse`, `--no-restrict-filenames`, `--youtube-include-dash-manifest`, `--no-format-sort-force`, `--flat-videos`, `--no-list-formats-as-table`, `--no-sponskrub`, `--no-sponskrub-cut`, `--no-sponskrub-force` + * Renamed: `--write-subs`, --no-write-subs`, `--no-write-auto-subs, `--write-auto-subs`. Note that these can still be used without the ending "s" +* Relaxed validation for format filters so that any arbitrary field can be used +* Fix for embedding thumbnail in mp3 by @pauldubois98 +* Make Twitch Video ID output from Playlist and VOD extractor same. This is only a temporary fix +* **Merge youtube-dl:** Upto [2020.01.03](https://github.com/ytdl-org/youtube-dl/commit/8e953dcbb10a1a42f4e12e4e132657cb0100a1f8) - See [blackjack4494/yt-dlc#280](https://github.com/blackjack4494/yt-dlc/pull/280) for details +* Cleaned up the fork for public use + +### 2021.01.05-2 +* **Changed defaults:** + * Enabled `--ignore` + * Disabled `--video-multistreams` and `--audio-multistreams` + * Changed default format selection to `bv*+ba/b` when `--audio-multistreams` is disabled + * Changed default format sort order to `res,fps,codec,size,br,asr,proto,ext,has_audio,source,format_id` + * Changed `webm` to be more preferable than `flv` in format sorting + * Changed default output template to `%(title)s [%(id)s].%(ext)s` + * Enabled `--list-formats-as-table` + +### 2021.01.07 +* Removed priority of `av01` codec in `-S` since most devices don't support it yet +* Added `duration_string` to be used in `--output` +* Created First Release # INSTALLATION -[How to update](#update) -**All Platforms** -Preferred way using pip: -You may want to use `python3` instead of `python` - - python -m pip install --upgrade youtube-dlc +To use the latest version, simply download and run the [latest release](https://github.com/pukkandan/yt-dlc/releases/latest). +Currently, there is no support for any package managers. If you want to install the current master branch - python -m pip install git+https://github.com/blackjack4494/yt-dlc - -**UNIX** (Linux, macOS, etc.) -Using wget: - - sudo wget https://github.com/blackjack4494/yt-dlc/releases/latest/download/youtube-dlc -O /usr/local/bin/youtube-dlc - sudo chmod a+rx /usr/local/bin/youtube-dlc - -Using curl: + python -m pip install git+https://github.com/pukkandan/yt-dlc - sudo curl -L https://github.com/blackjack4494/yt-dlc/releases/latest/download/youtube-dlc -o /usr/local/bin/youtube-dlc - sudo chmod a+rx /usr/local/bin/youtube-dlc +### UPDATE +**DO NOT UPDATE using `-U` !** instead download binaries again +### COMPILE -**Windows** users can download [youtube-dlc.exe](https://github.com/blackjack4494/yt-dlc/releases/latest/download/youtube-dlc.exe) (**do not** put in `C:\Windows\System32`!). - -**Compile** +**For Windows**: To build the Windows executable yourself (without version info!) python -m pip install --upgrade pyinstaller @@ -74,7 +106,7 @@ There will be a `youtube-dlc.exe` in `/dist` New way to build Windows is to use `python pyinst.py` (please use python3 64Bit) For 32Bit Version use a 32Bit Version of python (3 preferred here as well) and run `python pyinst32.py` -For Unix: +**For Unix**: You will need the required build tools python, make (GNU), pandoc, zip, nosetests Then simply type this @@ -82,26 +114,27 @@ Then simply type this make -# UPDATE -**DO NOT UPDATE using `-U` !** instead download binaries again or when installed with pip use a described above when installing. -I will add some memorable short links to the binaries so you can download them easier. - # DESCRIPTION **youtube-dlc** is a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.2+, and it is not platform specific. It should work on your Unix box, on Windows or on macOS. It is released to the public domain, which means you can modify it, redistribute it or use it however you like. youtube-dlc [OPTIONS] URL [URL...] + # OPTIONS +`Ctrl+F` is your friend :D + + +## General Options: -h, --help Print this help text and exit --version Print program version and exit - -U, --update Update this program to latest version. Make - sure that you have sufficient permissions - (run with sudo if needed) + -U, --update [BROKEN] Update this program to latest + version. Make sure that you have sufficient + permissions (run with sudo if needed) -i, --ignore-errors Continue on download errors, for example to skip unavailable videos in a playlist - --abort-on-error Abort downloading of further videos (in the - playlist or the command line) if an error - occurs + (default) (Same as --no-abort-on-error) + --abort-on-error Abort downloading of further videos if an + error occurs (Same as --no-ignore-errors) --dump-user-agent Display the current browser identification --list-extractors List all supported extractors --extractor-descriptions Output descriptions of all supported @@ -110,26 +143,28 @@ I will add some memorable short links to the binaries so you can download them e extractor --default-search PREFIX Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos - from google videos for youtube-dlc "large + from google videos for youtube-dl "large apple". Use the value "auto" to let - youtube-dlc guess ("auto_warning" to emit a + youtube-dl guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching. - --ignore-config Do not read configuration files. When given + --ignore-config, --no-config Do not read configuration files. When given in the global configuration file - /etc/youtube-dlc.conf: Do not read the user + /etc/youtube-dl.conf: Do not read the user configuration in ~/.config/youtube- - dlc/config (%APPDATA%/youtube- - dlc/config.txt on Windows) + dl/config (%APPDATA%/youtube-dl/config.txt + on Windows) --config-location PATH Location of the configuration file; either the path to the config or its containing directory. --flat-playlist Do not extract the videos of a playlist, only list them. + --flat-videos Do not resolve the video urls + --no-flat-playlist Extract the videos of a playlist --mark-watched Mark videos watched (YouTube only) - --no-mark-watched Do not mark videos watched (YouTube only) + --no-mark-watched Do not mark videos watched --no-color Do not emit color codes in output ## Network Options: @@ -180,11 +215,15 @@ I will add some memorable short links to the binaries so you can download them e SIZE (e.g. 50k or 44.6m) --max-filesize SIZE Do not download any videos larger than SIZE (e.g. 50k or 44.6m) - --date DATE Download only videos uploaded in this date + --date DATE Download only videos uploaded in this date. + The date can be "YYYYMMDD" or in the format + "(now|today)[+-][0-9](day|week|month|year)(s)?" --datebefore DATE Download only videos uploaded on or before - this date (i.e. inclusive) + this date. The date formats accepted is the + same as --date --dateafter DATE Download only videos uploaded on or after - this date (i.e. inclusive) + this date. The date formats accepted is the + same as --date --min-views COUNT Do not download any videos with less than COUNT views --max-views COUNT Do not download any videos with more than @@ -208,6 +247,7 @@ I will add some memorable short links to the binaries so you can download them e service), but who also have a description, use --match-filter "like_count > 100 & dislike_count ++...` (requires ffmpeg or avconv installed), for example `-f bestvideo+bestaudio` will download the best video-only format, the best audio-only format and mux them together with ffmpeg/avconv. If `--no-video-multistreams` is used, all formats with a video stream except the first one are ignored. Similarly, if `--no-audio-multistreams` is used, all formats with an audio stream except the first one are ignored. For example, `-f bestvideo+best+bestaudio` will download and merge all 3 given formats. The resulting file will have 2 video streams and 2 audio streams. But `-f bestvideo+best+bestaudio --no-video-multistreams` will download and merge only `bestvideo` and `bestaudio`. `best` is ignored since another format containing a video stream (`bestvideo`) has already been selected. The order of the formats is therefore important. `-f best+bestaudio --no-audio-multistreams` will download and merge both formats while `-f bestaudio+best --no-audio-multistreams` will ignore `best` and download only `bestaudio`. + +## Filtering Formats + You can also filter the video formats by putting a condition in brackets, as in `-f "best[height=720]"` (or `-f "[filesize>10M]"`). The following numeric meta fields can be used with comparisons `<`, `<=`, `>`, `>=`, `=` (equals), `!=` (not equals): @@ -734,60 +868,173 @@ Also filtering work for comparisons `=` (equals), `^=` (starts with), `$=` (ends - `container`: Name of the container format - `protocol`: The protocol that will be used for the actual download, lower-case (`http`, `https`, `rtsp`, `rtmp`, `rtmpe`, `mms`, `f4m`, `ism`, `http_dash_segments`, `m3u8`, or `m3u8_native`) - `format_id`: A short description of the format + - `language`: Language code Any string comparison may be prefixed with negation `!` in order to produce an opposite comparison, e.g. `!*=` (does not contain). -Note that none of the aforementioned meta fields are guaranteed to be present since this solely depends on the metadata obtained by particular extractor, i.e. the metadata offered by the video hoster. +Note that none of the aforementioned meta fields are guaranteed to be present since this solely depends on the metadata obtained by particular extractor, i.e. the metadata offered by the video hoster. Any other field made available by the extractor can also be used for filtering. Formats for which the value is not known are excluded unless you put a question mark (`?`) after the operator. You can combine format filters, so `-f "[height <=? 720][tbr>500]"` selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit/s. -You can merge the video and audio of two formats into a single file using `-f +` (requires ffmpeg or avconv installed), for example `-f bestvideo+bestaudio` will download the best video-only format, the best audio-only format and mux them together with ffmpeg/avconv. - Format selectors can also be grouped using parentheses, for example if you want to download the best mp4 and webm formats with a height lower than 480 you can use `-f '(mp4,webm)[height<480]'`. -Since the end of April 2015 and version 2015.04.26, youtube-dlc uses `-f bestvideo+bestaudio/best` as the default format selection (see [#5447](https://github.com/ytdl-org/youtube-dl/issues/5447), [#5456](https://github.com/ytdl-org/youtube-dl/issues/5456)). If ffmpeg or avconv are installed this results in downloading `bestvideo` and `bestaudio` separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to `best` and results in downloading the best available quality served as a single file. `best` is also needed for videos that don't come from YouTube because they don't provide the audio and video in two different files. If you want to only download some DASH formats (for example if you are not interested in getting videos with a resolution higher than 1080p), you can add `-f bestvideo[height<=?1080]+bestaudio/best` to your configuration file. Note that if you use youtube-dlc to stream to `stdout` (and most likely to pipe it to your media player then), i.e. you explicitly specify output template as `-o -`, youtube-dlc still uses `-f best` format selection in order to start content delivery immediately to your player and not to wait until `bestvideo` and `bestaudio` are downloaded and muxed. - -If you want to preserve the old format selection behavior (prior to youtube-dlc 2015.04.26), i.e. you want to download the best available quality media served as a single file, you should explicitly specify your choice with `-f best`. You may want to add it to the [configuration file](#configuration) in order not to type it every time you run youtube-dlc. - -#### Format selection examples +## Sorting Formats + +You can change the criteria for being considered the `best` by using `-S` (`--format-sort`). The general format for this is `--format-sort field1,field2...`. The available fields are: + + - `video`, `has_video`: Gives priority to formats that has a video stream + - `audio`, `has_audio`: Gives priority to formats that has a audio stream + - `extractor`, `preference`, `extractor_preference`: The format preference as given by the extractor + - `lang`, `language_preference`: Language preference as given by the extractor + - `quality`: The quality of the format. This is a metadata field available in some websites + - `source`, `source_preference`: Preference of the source as given by the extractor + - `proto`, `protocol`: Protocol used for download (`https`/`ftps` > `http`/`ftp` > `m3u8-native` > `m3u8` > `http-dash-segments` > other > `mms`/`rtsp` > unknown > `f4f`/`f4m`) + - `vcodec`, `video_codec`: Video Codec (`vp9` > `h265` > `h264` > `vp8` > `h263` > `theora` > other > unknown) + - `acodec`, `audio_codec`: Audio Codec (`opus` > `vorbis` > `aac` > `mp4a` > `mp3` > `ac3` > `dts` > other > unknown) + - `codec`: Equivalent to `vcodec,acodec` + - `vext`, `video_ext`: Video Extension (`mp4` > `webm` > `flv` > other > unknown). If `--prefer-free-formats` is used, `webm` is prefered. + - `aext`, `audio_ext`: Audio Extension (`m4a` > `aac` > `mp3` > `ogg` > `opus` > `webm` > other > unknown). If `--prefer-free-formats` is used, the order changes to `opus` > `ogg` > `webm` > `m4a` > `mp3` > `aac`. + - `ext`, `extension`: Equivalent to `vext,aext` + - `filesize`: Exact filesize, if know in advance. This will be unavailable for mu38 and DASH formats. + - `filesize_approx`: Approximate filesize calculated from the manifests + - `size`, `filesize_estimate`: Exact filesize if available, otherwise approximate filesize + - `height`: Height of video + - `width`: Width of video + - `res`, `dimension`: Video resolution, calculated as the smallest dimension. + - `fps`, `framerate`: Framerate of video + - `tbr`, `total_bitrate`: Total average bitrate in KBit/s + - `vbr`, `video_bitrate`: Average video bitrate in KBit/s + - `abr`, `audio_bitrate`: Average audio bitrate in KBit/s + - `br`, `bitrate`: Equivalent to using `tbr,vbr,abr` + - `samplerate`, `asr`: Audio sample rate in Hz + +Note that any other **numerical** field made available by the extractor can also be used. All fields, unless specified otherwise, are sorted in decending order. To reverse this, prefix the field with a `+`. Eg: `+res` prefers format with the smallest resolution. Additionally, you can suffix a prefered value for the fields, seperated by a `:`. Eg: `res:720` prefers larger videos, but no larger than 720p and the smallest video if there are no videos less than 720p. For `codec` and `ext`, you can provide two prefered values, the first for video and the second for audio. Eg: `+codec:avc:m4a` (equivalent to `+vcodec:avc,+acodec:m4a`) sets the video codec preference to `h264` > `h265` > `vp9` > `vp8` > `h263` > `theora` and audio codec preference to `mp4a` > `aac` > `vorbis` > `opus` > `mp3` > `ac3` > `dts`. You can also make the sorting prefer the nearest values to the provided by using `~` as the delimiter. Eg: `filesize~1G` prefers the format with filesize closest to 1 GiB. + +The fields `has_video`, `extractor`, `lang`, `quality` are always given highest priority in sorting, irrespective of the user-defined order. This behaviour can be changed by using `--force-format-sort`. Apart from these, the default order used is: `res,fps,codec,size,br,asr,proto,ext,has_audio,source,format_id`. Note that the extractors may override this default order, but they cannot override the user-provided order. + +If your format selector is `worst`, the last item is selected after sorting. This means it will select the format that is worst in all repects. Most of the time, what you actually want is the video with the smallest filesize instead. So it is generally better to use `-f best -S +size,+br,+res,+fps`. + +**Tip**: You can use the `-v -F` to see how the formats have been sorted (worst to best). + +## Format Selection examples Note that on Windows you may need to use double quotes instead of single. ```bash -# Download best mp4 format available or any other best if no mp4 available -$ youtube-dlc -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' +# Download and merge the best best video-only format and the best audio-only format, +# or download the best combined format if video-only format is not available +$ youtube-dlc -f 'bv+ba/b' -# Download best format available but no better than 480p -$ youtube-dlc -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' +# Download best format that contains video, +# and if it doesn't already have an audio stream, merge it with best audio-only format +$ youtube-dlc -f 'bv*+ba/b' -# Download best video only format but no bigger than 50 MB -$ youtube-dlc -f 'best[filesize<50M]' +# Same as above +$ youtube-dlc -# Download best format available via direct link over HTTP/HTTPS protocol -$ youtube-dlc -f '(bestvideo+bestaudio/best)[protocol^=http]' -# Download the best video format and the best audio format without merging them -$ youtube-dlc -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s' -``` -Note that in the last example, an output template is recommended as bestvideo and bestaudio may have the same file name. +# Download the worst video available +$ youtube-dlc -f 'wv*+wa/w' -# VIDEO SELECTION +# Download the best video available but with the smallest resolution +$ youtube-dlc -S '+res' -Videos can be filtered by their upload date using the options `--date`, `--datebefore` or `--dateafter`. They accept dates in two formats: +# Download the smallest video available +$ youtube-dlc -S '+size,+bitrate' - - Absolute dates: Dates in the format `YYYYMMDD`. - - Relative dates: Dates in the format `(now|today)[+-][0-9](day|week|month|year)(s)?` - -Examples: -```bash -# Download only the videos uploaded in the last 6 months -$ youtube-dlc --dateafter now-6months -# Download only the videos uploaded on January 1, 1970 -$ youtube-dlc --date 19700101 +# Download the best mp4 video available, or the best video if no mp4 available +$ youtube-dlc -f 'bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b' + +# Download the best video with the best extension +# (For video, mp4 > webm > flv. For audio, m4a > aac > mp3 ...) +$ youtube-dlc -S 'ext' + + + +# Download the best video available but no better than 480p, +# or the worst video if there is no video under 480p +$ youtube-dlc -f 'bv*[height<=480]+ba/b[height<=480] / wv*+ba/w' + +# Download the best video available with the largest height but no better than 480p, +# or the best video with the smallest resolution if there is no video under 480p +$ youtube-dlc -S 'height:480' + +# Download the best video available with the largest resolution but no better than 480p, +# or the best video with the smallest resolution if there is no video under 480p +# Resolution is determined by using the smallest dimension. +# So this works correctly for vertical videos as well +$ youtube-dlc -S 'res:480' + + -$ # Download only the videos uploaded in the 200x decade -$ youtube-dlc --dateafter 20000101 --datebefore 20091231 +# Download the best video (that also has audio) but no bigger than 50 MB, +# or the worst video (that also has audio) if there is no video under 50 MB +$ youtube-dlc -f 'b[filesize<50M] / w' + +# Download largest video (that also has audio) but no bigger than 50 MB, +# or the smallest video (that also has audio) if there is no video under 50 MB +$ youtube-dlc -f 'b' -S 'filesize:50M' + +# Download best video (that also has audio) that is closest in size to 50 MB +$ youtube-dlc -f 'b' -S 'filesize~50M' + + + +# Download best video available via direct link over HTTP/HTTPS protocol, +# or the best video available via any protocol if there is no such video +$ youtube-dlc -f '(bv*+ba/b)[protocol^=http][protocol!*=dash] / (bv*+ba/b)' + +# Download best video available via the best protocol +# (https/ftps > http/ftp > m3u8_native > m3u8 > http_dash_segments ...) +$ youtube-dlc -S 'protocol' + + + +# Download the best video-only format and the best audio-only format without merging them +# For this case, an output template should be used since +# by default, bestvideo and bestaudio will have the same file name. +$ youtube-dlc -f 'bv,ba' -o '%(title)s.f%(format_id)s.%(ext)s' + + + +# Download the best video with h264 codec, or the best video if there is no such video +$ youtube-dlc -f '(bv*+ba/b)[vcodec^=avc1] / (bv*+ba/b)' + +# Download the best video with best codec no better than h264, +# or the best video with worst codec if there is no such video +$ youtube-dlc -S 'codec:h264' + +# Download the best video with worst codec no worse than h264, +# or the best video with best codec if there is no such video +$ youtube-dlc -S '+codec:h264' + + + +# More complex examples + +# Download the best video no better than 720p prefering framerate greater than 30, +# or the worst video (still prefering framerate greater than 30) if there is no such video +$ youtube-dlc -f '((bv*[fps>30]/bv*)[height<=720]/(wv*[fps>30]/wv*)) + ba / (b[fps>30]/b)[height<=720]/(w[fps>30]/w)' + +# Download the video with the largest resolution no better than 720p, +# or the video with the smallest resolution available if there is no such video, +# prefering larger framerate for formats with the same resolution +$ youtube-dlc -S 'res:720,fps' + + + +# Download the video with smallest resolution no worse than 480p, +# or the video with the largest resolution available if there is no such video, +# prefering better codec and then larger total bitrate for the same resolution +$ youtube-dlc -S '+res:480,codec,br' ``` + + + + + +# MORE +For FAQ, Developer Instructions etc., see the [original README](https://github.com/ytdl-org/youtube-dl) diff --git a/devscripts/create-github-release.py b/devscripts/create-github-release.py index 4714d81a6..3e11be6fa 100644 --- a/devscripts/create-github-release.py +++ b/devscripts/create-github-release.py @@ -1,3 +1,5 @@ +# Unused + #!/usr/bin/env python from __future__ import unicode_literals diff --git a/devscripts/install_jython.sh b/devscripts/install_jython.sh deleted file mode 100755 index bafca4da4..000000000 --- a/devscripts/install_jython.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -wget http://central.maven.org/maven2/org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar -java -jar jython-installer-2.7.1.jar -s -d "$HOME/jython" -$HOME/jython/bin/jython -m pip install nose diff --git a/devscripts/make_readme.py b/devscripts/make_readme.py index 73f203582..9cbf5b749 100755 --- a/devscripts/make_readme.py +++ b/devscripts/make_readme.py @@ -13,14 +13,14 @@ if isinstance(helptext, bytes): with io.open(README_FILE, encoding='utf-8') as f: oldreadme = f.read() -header = oldreadme[:oldreadme.index('# OPTIONS')] -# footer = oldreadme[oldreadme.index('# CONFIGURATION'):] +header = oldreadme[:oldreadme.index('## General Options:')] +footer = oldreadme[oldreadme.index('# CONFIGURATION'):] -options = helptext[helptext.index(' General Options:') + 19:] +options = helptext[helptext.index(' General Options:'):] options = re.sub(r'(?m)^ (\w.+)$', r'## \1', options) -options = '# OPTIONS\n' + options + '\n' +options = options + '\n' with io.open(README_FILE, 'w', encoding='utf-8') as f: f.write(header) f.write(options) - # f.write(footer) + f.write(footer) diff --git a/devscripts/release.sh b/devscripts/release.sh index 04cb7fec1..2da2ac471 100755 --- a/devscripts/release.sh +++ b/devscripts/release.sh @@ -1,3 +1,4 @@ +# Unused #!/bin/bash # IMPORTANT: the following assumptions are made diff --git a/devscripts/run_tests.bat b/devscripts/run_tests.bat new file mode 100644 index 000000000..79359b5a7 --- /dev/null +++ b/devscripts/run_tests.bat @@ -0,0 +1,17 @@ +@echo off + +rem Keep this list in sync with the `offlinetest` target in Makefile +set DOWNLOAD_TESTS="age_restriction^|download^|iqiyi_sdk_interpreter^|socks^|subtitles^|write_annotations^|youtube_lists^|youtube_signature" + +if "%YTDL_TEST_SET%" == "core" ( + set test_set="-I test_("%DOWNLOAD_TESTS%")\.py" + set multiprocess_args="" +) else if "%YTDL_TEST_SET%" == "download" ( + set test_set="-I test_(?!"%DOWNLOAD_TESTS%").+\.py" + set multiprocess_args="--processes=4 --process-timeout=540" +) else ( + echo YTDL_TEST_SET is not set or invalid + exit /b 1 +) + +nosetests test --verbose %test_set:"=% %multiprocess_args:"=% diff --git a/devscripts/show-downloads-statistics.py b/devscripts/show-downloads-statistics.py index ef90a56ab..b8c4269c4 100644 --- a/devscripts/show-downloads-statistics.py +++ b/devscripts/show-downloads-statistics.py @@ -1,3 +1,5 @@ +# Unused + #!/usr/bin/env python from __future__ import unicode_literals diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 0b183b272..54911fcc5 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -34,6 +34,8 @@ - **adobetv:video** - **AdultSwim** - **aenetworks**: A+E Networks: A&E, Lifetime, History.com, FYI Network and History Vault + - **aenetworks:collection** + - **aenetworks:show** - **afreecatv**: afreecatv.com - **AirMozilla** - **AliExpressLive** @@ -42,6 +44,7 @@ - **AlphaPorno** - **Alura** - **AluraCourse** + - **Amara** - **AMCNetworks** - **AmericasTestKitchen** - **anderetijden**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl @@ -55,10 +58,12 @@ - **appletrailers** - **appletrailers:section** - **archive.org**: archive.org videos + - **ArcPublishing** - **ARD** - **ARD:mediathek** - **ARDBetaMediathek** - **Arkena** + - **arte.sky.it** - **ArteTV** - **ArteTVEmbed** - **ArteTVPlaylist** @@ -101,15 +106,18 @@ - **BilibiliAudioAlbum** - **BiliBiliPlayer** - **BioBioChileTV** + - **Biography** - **BIQLE** - **BitChute** - **BitChuteChannel** - - **bitwave.tv** + - **bitwave:replay** + - **bitwave:stream** - **BleacherReport** - **BleacherReportCMS** - **blinkx** - **Bloomberg** - **BokeCC** + - **BongaCams** - **BostonGlobe** - **Box** - **Bpb**: Bundeszentrale für politische Bildung @@ -144,6 +152,7 @@ - **CBS** - **CBSInteractive** - **CBSLocal** + - **CBSLocalArticle** - **cbsnews**: CBS News - **cbsnews:embed** - **cbsnews:livevideo**: CBS News Live Videos @@ -193,9 +202,9 @@ - **CrooksAndLiars** - **crunchyroll** - **crunchyroll:playlist** - - **CSNNE** - **CSpan**: C-SPAN - **CtsNews**: 華視新聞 + - **CTV** - **CTVNews** - **cu.ntv.co.jp**: Nippon Television Network - **Culturebox** @@ -271,7 +280,6 @@ - **ESPNArticle** - **EsriVideo** - **Europa** - - **EveryonesMixtape** - **EWETV** - **ExpoTV** - **Expressen** @@ -313,11 +321,11 @@ - **FrontendMasters** - **FrontendMastersCourse** - **FrontendMastersLesson** + - **FujiTVFODPlus7** - **Funimation** - **Funk** - **Fusion** - **Fux** - - **FXNetworks** - **Gaia** - **GameInformer** - **GameSpot** @@ -325,6 +333,8 @@ - **Gaskrank** - **Gazeta** - **GDCVault** + - **Gedi** + - **GediEmbeds** - **generic**: Generic downloader that works on some sites - **Gfycat** - **GiantBomb** @@ -350,6 +360,7 @@ - **hgtv.com:show** - **HiDive** - **HistoricFilms** + - **history:player** - **history:topic**: History.com Topic - **hitbox** - **hitbox:live** @@ -403,7 +414,6 @@ - **JWPlatform** - **Kakao** - **Kaltura** - - **KanalPlay**: Kanal 5/9/11 Play - **Kankan** - **Karaoketv** - **KarriereVideos** @@ -427,7 +437,8 @@ - **la7.it** - **laola1tv** - **laola1tv:embed** - - **lbry.tv** + - **lbry** + - **lbry:channel** - **LCI** - **Lcp** - **LcpPlay** @@ -493,6 +504,7 @@ - **META** - **metacafe** - **Metacritic** + - **mewatch** - **Mgoon** - **MGTV**: 芒果TV - **MiaoPai** @@ -503,8 +515,6 @@ - **mixcloud** - **mixcloud:playlist** - **mixcloud:user** - - **Mixer:live** - - **Mixer:vod** - **MLB** - **Mnet** - **MNetTV** @@ -547,6 +557,11 @@ - **Naver** - **Naver:live** - **NBA** + - **nba:watch** + - **nba:watch:collection** + - **NBAChannel** + - **NBAEmbed** + - **NBAWatchEmbed** - **NBC** - **NBCNews** - **nbcolympics** @@ -576,8 +591,10 @@ - **NextTV**: 壹電視 - **Nexx** - **NexxEmbed** - - **nfl.com** + - **nfl.com** (Currently broken) + - **nfl.com:article** (Currently broken) - **NhkVod** + - **NhkVodProgram** - **nhl.com** - **nick.com** - **nick.de** @@ -592,7 +609,6 @@ - **njoy:embed** - **NJPWWorld**: 新日本プロレスワールド - **NobelPrize** - - **Noco** - **NonkTube** - **Noovo** - **Normalboots** @@ -610,6 +626,7 @@ - **Npr** - **NRK** - **NRKPlaylist** + - **NRKRadioPodkast** - **NRKSkole**: NRK Skole - **NRKTV**: NRK TV and NRK Radio - **NRKTVDirekte**: NRK TV Direkte and NRK Radio Direkte @@ -681,6 +698,7 @@ - **Platzi** - **PlatziCourse** - **play.fm** + - **player.sky.it** - **PlayPlusTV** - **PlaysTV** - **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz @@ -719,6 +737,7 @@ - **qqmusic:singer**: QQ音乐 - 歌手 - **qqmusic:toplist**: QQ音乐 - 排行榜 - **QuantumTV** + - **Qub** - **Quickline** - **QuicklineLive** - **R7** @@ -736,6 +755,9 @@ - **RayWenderlich** - **RayWenderlichCourse** - **RBMARadio** + - **RCS** + - **RCSEmbeds** + - **RCSVarious** - **RDS**: RDS.ca - **RedBull** - **RedBullEmbed** @@ -811,18 +833,17 @@ - **Shared**: shared.sx - **ShowRoomLive** - **Sina** + - **sky.it** + - **sky:news** + - **sky:sports** + - **sky:sports:news** + - **skyacademy.it** - **SkylineWebcams** - - **SkyNews** - **skynewsarabia:article** - **skynewsarabia:video** - - **SkySports** - **Slideshare** - **SlidesLive** - **Slutload** - - **smotri**: Smotri.com - - **smotri:broadcast**: Smotri.com broadcasts - - **smotri:community**: Smotri.com community videos - - **smotri:user**: Smotri.com user videos - **Snotr** - **Sohu** - **SonyLIV** @@ -883,7 +904,6 @@ - **Tagesschau** - **tagesschau:player** - **Tass** - - **TastyTrade** - **TBS** - **TDSLifeway** - **Teachable** @@ -906,6 +926,7 @@ - **TeleQuebecEmission** - **TeleQuebecLive** - **TeleQuebecSquat** + - **TeleQuebecVideo** - **TeleTask** - **Telewebion** - **TennisTV** @@ -922,10 +943,10 @@ - **ThisAmericanLife** - **ThisAV** - **ThisOldHouse** + - **ThisVid** - **TikTok** - **tinypic**: tinypic.com videos - **TMZ** - - **TMZArticle** - **TNAFlix** - **TNAFlixNetworkEmbed** - **toggle** @@ -955,12 +976,15 @@ - **TV2DKBornholmPlay** - **TV4**: tv4.se and tv4play.se - **TV5MondePlus**: TV5MONDE+ + - **tv5unis** + - **tv5unis:video** - **tv8.it** - **TVA** - **TVANouvelles** - **TVANouvellesArticle** - **TVC** - **TVCArticle** + - **TVer** - **tvigle**: Интернет-телевидение Tvigle.ru - **tvland.com** - **TVN24** @@ -1029,6 +1053,8 @@ - **Viddler** - **Videa** - **video.google:search**: Google Video search + - **video.sky.it** + - **video.sky.it:live** - **VideoDetective** - **videofy.me** - **videomore** @@ -1089,6 +1115,7 @@ - **vube**: Vube.com - **VuClip** - **VVVVID** + - **VVVVIDShow** - **VyboryMos** - **Vzaar** - **Wakanim** @@ -1111,6 +1138,7 @@ - **WeiboMobile** - **WeiqiTV**: WQTV - **Wistia** + - **WistiaPlaylist** - **wnl**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl - **WorldStarHipHop** - **WSJ**: Wall Street Journal @@ -1142,6 +1170,8 @@ - **yahoo:japannews**: Yahoo! Japan News - **YandexDisk** - **yandexmusic:album**: Яндекс.Музыка - Альбом + - **yandexmusic:artist:albums**: Яндекс.Музыка - Артист - Альбомы + - **yandexmusic:artist:tracks**: Яндекс.Музыка - Артист - Треки - **yandexmusic:playlist**: Яндекс.Музыка - Плейлист - **yandexmusic:track**: Яндекс.Музыка - Трек - **YandexVideo** @@ -1163,18 +1193,19 @@ - **youtube:history**: Youtube watch history, ":ythistory" for short (requires authentication) - **youtube:playlist**: YouTube.com playlists - **youtube:recommended**: YouTube.com recommended videos, ":ytrec" for short (requires authentication) - - **youtube:search**: YouTube.com searches, "ytsearch" keyword + - **youtube:search**: YouTube.com searches - **youtube:search:date**: YouTube.com searches, newest videos first, "ytsearchdate" keyword - - **youtube:search_url**: YouTube.com search URLs + - **youtube:search_url**: YouTube.com searches, "ytsearch" keyword - **youtube:subscriptions**: YouTube.com subscriptions feed, ":ytsubs" for short (requires authentication) - **youtube:tab**: YouTube.com tab - **youtube:watchlater**: Youtube watch later list, ":ytwatchlater" for short (requires authentication) + - **YoutubeYtBe**: youtu.be - **YoutubeYtUser**: YouTube.com user videos, URL or "ytuser" keyword - **Zapiks** - - **Zaq1** - **Zattoo** - **ZattooLive** - **ZDF-3sat** - **ZDFChannel** - **zingmp3**: mp3.zing.vn + - **zoom** - **Zype** diff --git a/scripts/update-version.py b/scripts/update-version.py index 5d779717d..e1eb53f38 100644 --- a/scripts/update-version.py +++ b/scripts/update-version.py @@ -1,3 +1,5 @@ +# Unused + from __future__ import unicode_literals from datetime import datetime import urllib.request diff --git a/setup.cfg b/setup.cfg index f658aaa0a..ffc0fd2fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,5 +2,5 @@ universal = True [flake8] -exclude = youtube_dlc/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv -ignore = E402,E501,E731,E741,W503 +exclude = youtube_dlc/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv,devscripts/create-github-release.py,devscripts/release.sh,devscripts/show-downloads-statistics.py,scripts/update-version.py +ignore = E402,E501,E731,E741,W503 \ No newline at end of file diff --git a/setup.py b/setup.py index 6908f2404..346c5cb64 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ setup( description=DESCRIPTION, long_description=LONG_DESCRIPTION, # long_description_content_type="text/markdown", - url="https://github.com/blackjack4494/yt-dlc", + url="https://github.com/pukkandan/yt-dlc", packages=find_packages(exclude=("youtube_dl","test",)), #packages=[ # 'youtube_dlc', diff --git a/test/parameters.json b/test/parameters.json index 65fd54428..f8abed2dd 100644 --- a/test/parameters.json +++ b/test/parameters.json @@ -7,6 +7,7 @@ "forcethumbnail": false, "forcetitle": false, "forceurl": false, + "force_write_download_archive": false, "format": "best", "ignoreerrors": false, "listformats": null, @@ -35,6 +36,11 @@ "verbose": true, "writedescription": false, "writeinfojson": true, + "writeannotations": false, + "writelink": false, + "writeurllink": false, + "writewebloclink": false, + "writedesktoplink": false, "writesubtitles": false, "allsubtitles": false, "listsubtitles": false, diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py index bdd01e41a..22e3d26a7 100644 --- a/test/test_InfoExtractor.py +++ b/test/test_InfoExtractor.py @@ -98,6 +98,55 @@ class TestInfoExtractor(unittest.TestCase): self.assertRaises(RegexNotFoundError, ie._html_search_meta, 'z', html, None, fatal=True) self.assertRaises(RegexNotFoundError, ie._html_search_meta, ('z', 'x'), html, None, fatal=True) + def test_search_json_ld_realworld(self): + # https://github.com/ytdl-org/youtube-dl/issues/23306 + expect_dict( + self, + self.ie._search_json_ld(r'''''', None), + { + 'title': '1 On 1 With Kleio', + 'description': 'Kleio Valentien', + 'url': 'https://gvideo.eporner.com/xN49A1cT3eB/xN49A1cT3eB.mp4', + 'timestamp': 1449347075, + 'duration': 743.0, + 'view_count': 1120958, + 'width': 1920, + 'height': 1080, + }) + def test_download_json(self): uri = encode_data_uri(b'{"foo": "blah"}', 'application/json') self.assertEqual(self.ie._download_json(uri, None), {'foo': 'blah'}) @@ -108,6 +157,18 @@ class TestInfoExtractor(unittest.TestCase): self.assertEqual(self.ie._download_json(uri, None, fatal=False), None) def test_parse_html5_media_entries(self): + # inline video tag + expect_dict( + self, + self.ie._parse_html5_media_entries( + 'https://127.0.0.1/video.html', + r'