From c76eb41bb9e7e0a106ce44f4afcf74b0c00a3fb2 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 7 Jan 2021 12:11:05 +0530 Subject: [PATCH] Preparing for release --- .github/ISSUE_TEMPLATE/1_broken_site.md | 16 +- .../ISSUE_TEMPLATE/2_site_support_request.md | 10 +- .../ISSUE_TEMPLATE/3_site_feature_request.md | 10 +- .github/ISSUE_TEMPLATE/4_bug_report.md | 20 +- .github/ISSUE_TEMPLATE/5_feature_request.md | 10 +- .github/ISSUE_TEMPLATE/6_question.md | 2 +- .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md | 17 +- .../2_site_support_request.md | 14 +- .../3_site_feature_request.md | 11 +- .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md | 17 +- .../ISSUE_TEMPLATE_tmpl/5_feature_request.md | 12 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/build.yml | 24 +- .github/workflows/ci.yml | 74 +++++ .gitignore | 2 + .travis.yml => .travis.yml.disabled | 0 Makefile | 3 +- README.md | 270 +++++++----------- devscripts/create-github-release.py | 2 + devscripts/install_jython.sh | 5 - devscripts/make_readme.py | 10 +- devscripts/release.sh | 1 + devscripts/run_tests.bat | 17 ++ devscripts/show-downloads-statistics.py | 2 + docs/supportedsites.md | 21 +- scripts/update-version.py | 2 + setup.cfg | 4 +- setup.py | 2 +- version.txt | 1 - youtube-dlc.cmd | 1 + youtube_dlc/extractor/generic.py | 3 + youtube_dlc/extractor/itv.py | 1 - youtube_dlc/extractor/mitele.py | 1 - youtube_dlc/extractor/twitch.py | 2 +- youtube_dlc/extractor/wdr.py | 2 +- youtube_dlc/extractor/youtube.py | 8 +- youtube_dlc/options.py | 57 ++-- youtube_dlc/postprocessor/embedthumbnail.py | 2 +- youtube_dlc/utils.py | 6 +- youtube_dlc/version.py | 2 +- yt-dlc.sublime-project | 2 +- 41 files changed, 384 insertions(+), 284 deletions(-) create mode 100644 .github/workflows/ci.yml rename .travis.yml => .travis.yml.disabled (100%) delete mode 100755 devscripts/install_jython.sh create mode 100644 devscripts/run_tests.bat delete mode 100644 version.txt create mode 100644 youtube-dlc.cmd diff --git a/.github/ISSUE_TEMPLATE/1_broken_site.md b/.github/ISSUE_TEMPLATE/1_broken_site.md index 32c14aa851..869fbd72a9 100644 --- a/.github/ISSUE_TEMPLATE/1_broken_site.md +++ b/.github/ISSUE_TEMPLATE/1_broken_site.md @@ -21,15 +21,15 @@ ## Checklist - [ ] 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.05-2** - [ ] 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 @@ ## Verbose log [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.05-2 [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 @@ ## Verbose log ``` 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 fe1aade055..a5877a5504 100644 --- a/.github/ISSUE_TEMPLATE/2_site_support_request.md +++ b/.github/ISSUE_TEMPLATE/2_site_support_request.md @@ -21,15 +21,15 @@ ## Checklist - [ ] 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.05-2** - [ ] 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 cddb81dda4..07440b8b39 100644 --- a/.github/ISSUE_TEMPLATE/3_site_feature_request.md +++ b/.github/ISSUE_TEMPLATE/3_site_feature_request.md @@ -21,20 +21,20 @@ ## Checklist - [ ] 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.05-2** - [ ] 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 920ae8dbca..120205c4e1 100644 --- a/.github/ISSUE_TEMPLATE/4_bug_report.md +++ b/.github/ISSUE_TEMPLATE/4_bug_report.md @@ -21,16 +21,16 @@ ## Checklist - [ ] 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.05-2** - [ ] 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 @@ ## Verbose log [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.05-2 [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 @@ ## Verbose log ``` PASTE VERBOSE LOG HERE + ``` + ## Description diff --git a/.github/ISSUE_TEMPLATE/5_feature_request.md b/.github/ISSUE_TEMPLATE/5_feature_request.md index 7cc390f58b..aacb82a41d 100644 --- a/.github/ISSUE_TEMPLATE/5_feature_request.md +++ b/.github/ISSUE_TEMPLATE/5_feature_request.md @@ -21,20 +21,20 @@ ## Checklist - [ ] 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.05-2** - [ ] 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 3c3ae0f3b1..647eb2d0c3 100644 --- a/.github/ISSUE_TEMPLATE/6_question.md +++ b/.github/ISSUE_TEMPLATE/6_question.md @@ -23,7 +23,7 @@ ## Checklist 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 3fe4d6968d..6df9124c38 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 @@ ## Verbose log ``` 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 aad8fa0541..3844e02950 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 2fb82f8286..dff7547afd 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 b7bebf8ab7..90439f3d98 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 @@ ## Verbose log ``` 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 99592f79de..50bbf6091e 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 e69b907d8f..fa06e65b9c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,7 @@ ## Please follow the guide below ### 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 dd6a95256f..828c2b0d5d 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 0000000000..f8ce8d50e3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI +on: [push] +jobs: + tests: + name: Tests + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + # TODO: python 2.6 + python-version: [2.7, 3.3, 3.4, 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 f2bf85724b..093d4f2ed8 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 diff --git a/.travis.yml b/.travis.yml.disabled similarity index 100% rename from .travis.yml rename to .travis.yml.disabled diff --git a/Makefile b/Makefile index 9588657c15..928b525a0d 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: README.md CONTRIBUTING.md issuetemplates supportedsites clean 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 2ab8d2de9f..8a7e1b6db0 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ +[![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) -- [ABOUT THIS FORK](#about-this-fork) -- [INSTALLATION](#installation) -- [YOUTUBE-DLC](#youtube-dlc) -- [DESCRIPTION](#description) -- [OPTIONS](#options) +* [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) @@ -27,23 +29,23 @@ * [Post-processing Options](#post-processing-options) * [SponSkrub Options (SponsorBlock)](#sponskrub-options-sponsorblock) * [Extractor Options](#extractor-options) -- [CONFIGURATION](#configuration) +* [CONFIGURATION](#configuration) * [Authentication with .netrc file](#authentication-with-netrc-file) -- [OUTPUT TEMPLATE](#output-template) +* [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](#format-selection) * [Filtering Formats](#filtering-formats) * [Sorting Formats](#sorting-formats) * [Format Selection examples](#format-selection-examples) -- [VIDEO SELECTION](#video-selection-1) -- [MORE](#more) +* [VIDEO SELECTION](#video-selection-1) +* [MORE](#more) # CHANGES See [commits](https://github.com/pukkandan/yt-dlc/commits) for more details -### 2021.01.05.01 +### 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*` @@ -63,7 +65,7 @@ ### 2021.01.05.01 * **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.02 +### 2021.01.05-2 * **Changed defaults:** * Enabled `--ignore` * Disabled `--video-multistreams` and `--audio-multistreams` @@ -73,68 +75,26 @@ ### 2021.01.05.02 * Changed default output template to `%(title)s [%(id)s].%(ext)s` * Enabled `--list-formats-as-table` - -# ABOUT THIS FORK - -WIP - +### 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 -WIP - - - - - - -# YOUTUBE-DLC - -[![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 -[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 + python -m pip install git+https://github.com/pukkandan/yt-dlc -**UNIX** (Linux, macOS, etc.) -Using wget: +### UPDATE +**DO NOT UPDATE using `-U` !** instead download binaries again - 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 +### COMPILE -Using curl: - - 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 - - -**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 @@ -146,7 +106,7 @@ ### INSTALLATION 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 @@ -154,29 +114,22 @@ ### INSTALLATION 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 (Doesn't work since there is no release) - 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 (default) (Same as --no-abort-on-error) @@ -211,7 +164,7 @@ # OPTIONS --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: @@ -266,11 +219,11 @@ ## Video Selection: 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). The date formats - accepted is the same as --date + 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). The date formats - accepted is the same as --date + 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 @@ -294,7 +247,7 @@ ## Video Selection: service), but who also have a description, use --match-filter "like_count > 100 & dislike_count `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` > `flv` > `webm` > other > unknown). If `--prefer-free-formats` is used, `webm` is prefered. + - `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. diff --git a/devscripts/create-github-release.py b/devscripts/create-github-release.py index 4714d81a6e..3e11be6fa1 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 bafca4da4f..0000000000 --- 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 73f203582a..9cbf5b7498 100755 --- a/devscripts/make_readme.py +++ b/devscripts/make_readme.py @@ -13,14 +13,14 @@ 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 04cb7fec1b..2da2ac4718 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 0000000000..79359b5a7b --- /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 ef90a56ab2..b8c4269c48 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 8aede26a91..54911fcc56 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -44,6 +44,7 @@ # Supported sites - **AlphaPorno** - **Alura** - **AluraCourse** + - **Amara** - **AMCNetworks** - **AmericasTestKitchen** - **anderetijden**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl @@ -62,6 +63,7 @@ # Supported sites - **ARD:mediathek** - **ARDBetaMediathek** - **Arkena** + - **arte.sky.it** - **ArteTV** - **ArteTVEmbed** - **ArteTVPlaylist** @@ -108,7 +110,8 @@ # Supported sites - **BIQLE** - **BitChute** - **BitChuteChannel** - - **bitwave.tv** + - **bitwave:replay** + - **bitwave:stream** - **BleacherReport** - **BleacherReportCMS** - **blinkx** @@ -330,6 +333,8 @@ # Supported sites - **Gaskrank** - **Gazeta** - **GDCVault** + - **Gedi** + - **GediEmbeds** - **generic**: Generic downloader that works on some sites - **Gfycat** - **GiantBomb** @@ -693,6 +698,7 @@ # Supported sites - **Platzi** - **PlatziCourse** - **play.fm** + - **player.sky.it** - **PlayPlusTV** - **PlaysTV** - **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz @@ -749,6 +755,9 @@ # Supported sites - **RayWenderlich** - **RayWenderlichCourse** - **RBMARadio** + - **RCS** + - **RCSEmbeds** + - **RCSVarious** - **RDS**: RDS.ca - **RedBull** - **RedBullEmbed** @@ -934,11 +943,10 @@ # Supported sites - **ThisAmericanLife** - **ThisAV** - **ThisOldHouse** + - **ThisVid** - **TikTok** - - **TikTokUser** (Currently broken) - **tinypic**: tinypic.com videos - **TMZ** - - **TMZArticle** - **TNAFlix** - **TNAFlixNetworkEmbed** - **toggle** @@ -1045,6 +1053,8 @@ # Supported sites - **Viddler** - **Videa** - **video.google:search**: Google Video search + - **video.sky.it** + - **video.sky.it:live** - **VideoDetective** - **videofy.me** - **videomore** @@ -1183,9 +1193,9 @@ # Supported sites - **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) @@ -1197,4 +1207,5 @@ # Supported sites - **ZDF-3sat** - **ZDFChannel** - **zingmp3**: mp3.zing.vn + - **zoom** - **Zype** diff --git a/scripts/update-version.py b/scripts/update-version.py index 5d779717df..e1eb53f382 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 f658aaa0ac..ffc0fd2fd2 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 6908f24045..346c5cb64f 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def run(self): 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/version.txt b/version.txt deleted file mode 100644 index a6d68d626b..0000000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -2021.01.05.02 \ No newline at end of file diff --git a/youtube-dlc.cmd b/youtube-dlc.cmd new file mode 100644 index 0000000000..382a5e5e06 --- /dev/null +++ b/youtube-dlc.cmd @@ -0,0 +1 @@ +py "%~dp0\youtube_dl\__main__.py" \ No newline at end of file diff --git a/youtube_dlc/extractor/generic.py b/youtube_dlc/extractor/generic.py index 6246b8a839..6b4c842614 100644 --- a/youtube_dlc/extractor/generic.py +++ b/youtube_dlc/extractor/generic.py @@ -20,12 +20,14 @@ ExtractorError, float_or_none, HEADRequest, + int_or_none, is_html, js_to_json, KNOWN_EXTENSIONS, merge_dicts, mimetype2ext, orderedSet, + parse_duration, sanitized_Request, smuggle_url, unescapeHTML, @@ -35,6 +37,7 @@ url_or_none, xpath_attr, xpath_text, + xpath_with_ns, ) from .commonprotocols import RtmpIE from .brightcove import ( diff --git a/youtube_dlc/extractor/itv.py b/youtube_dlc/extractor/itv.py index b767ca0ddc..4122ac880c 100644 --- a/youtube_dlc/extractor/itv.py +++ b/youtube_dlc/extractor/itv.py @@ -2,7 +2,6 @@ from __future__ import unicode_literals import json -import re from .common import InfoExtractor from .brightcove import BrightcoveNewIE diff --git a/youtube_dlc/extractor/mitele.py b/youtube_dlc/extractor/mitele.py index 0b240d27f5..b5937233b9 100644 --- a/youtube_dlc/extractor/mitele.py +++ b/youtube_dlc/extractor/mitele.py @@ -1,6 +1,5 @@ # coding: utf-8 from __future__ import unicode_literals -import json from .telecinco import TelecincoIE from ..utils import ( diff --git a/youtube_dlc/extractor/twitch.py b/youtube_dlc/extractor/twitch.py index 34892d69d9..ab131a07d1 100644 --- a/youtube_dlc/extractor/twitch.py +++ b/youtube_dlc/extractor/twitch.py @@ -324,7 +324,7 @@ def _make_video_result(node): return { '_type': 'url_transparent', 'ie_key': TwitchVodIE.ie_key(), - 'id': 'v'+ video_id, + 'id': 'v' + video_id, 'url': 'https://www.twitch.tv/videos/%s' % video_id, 'title': node.get('title'), 'thumbnail': node.get('previewThumbnailURL'), diff --git a/youtube_dlc/extractor/wdr.py b/youtube_dlc/extractor/wdr.py index 5cb5924f80..9658ecea78 100644 --- a/youtube_dlc/extractor/wdr.py +++ b/youtube_dlc/extractor/wdr.py @@ -47,6 +47,7 @@ def _real_extract(self, url): media_resource = metadata['mediaResource'] formats = [] + subtitles = {} # check if the metadata contains a direct URL to a file for kind, media in media_resource.items(): @@ -93,7 +94,6 @@ def _real_extract(self, url): self._sort_formats(formats) - subtitles = {} caption_url = media_resource.get('captionURL') if caption_url: subtitles['de'] = [{ diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index c67ecde042..59e5bc2ab6 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -3342,7 +3342,7 @@ def _real_extract(self, url): if is_home is not None and is_home.group('not_channel') is None and item_id != 'feed': self._downloader.report_warning( 'A channel/user page was given. All the channel\'s videos will be downloaded. ' - 'To download only the videos in the home page, add a "/home" to the URL') + 'To download only the videos in the home page, add a "/featured" to the URL') url = '%s/videos%s' % (is_home.group('pre'), is_home.group('post') or '') # Handle both video/playlist URLs @@ -3464,6 +3464,7 @@ def _real_extract(self, url): class YoutubeYtBeIE(InfoExtractor): + IE_DESC = 'youtu.be' _VALID_URL = r'https?://youtu\.be/(?P[0-9A-Za-z_-]{11})/*?.*?\blist=(?P%(playlist_id)s)' % {'playlist_id': YoutubeBaseInfoExtractor._PLAYLIST_ID_RE} _TESTS = [{ 'url': 'https://youtu.be/yeWKywCrFtk?list=PL2qgrgXsNUG5ig9cat4ohreBjYLAPC0J5', @@ -3503,6 +3504,7 @@ def _real_extract(self, url): class YoutubeYtUserIE(InfoExtractor): + IE_DESC = 'YouTube.com user videos, URL or "ytuser" keyword' _VALID_URL = r'ytuser:(?P.+)' _TESTS = [{ 'url': 'ytuser:phihag', @@ -3647,12 +3649,12 @@ def _get_n_results(self, query, n): class YoutubeSearchDateIE(YoutubeSearchIE): IE_NAME = YoutubeSearchIE.IE_NAME + ':date' _SEARCH_KEY = 'ytsearchdate' - IE_DESC = 'YouTube.com searches, newest videos first' + IE_DESC = 'YouTube.com searches, newest videos first, "ytsearchdate" keyword' _SEARCH_PARAMS = 'CAI%3D' class YoutubeSearchURLIE(YoutubeSearchIE): - IE_DESC = 'YouTube.com search URLs' + IE_DESC = 'YouTube.com searches, "ytsearch" keyword' IE_NAME = YoutubeSearchIE.IE_NAME + '_url' _VALID_URL = r'https?://(?:www\.)?youtube\.com/results\?(.*?&)?(?:search_query|q)=(?:[^&]+)(?:[&]|$)' # _MAX_RESULTS = 100 diff --git a/youtube_dlc/options.py b/youtube_dlc/options.py index 4804fb1f08..3a7249ee64 100644 --- a/youtube_dlc/options.py +++ b/youtube_dlc/options.py @@ -140,7 +140,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): general.add_option( '-U', '--update', action='store_true', dest='update_self', - help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)') + help='[BROKEN] Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)') general.add_option( '-i', '--ignore-errors', '--no-abort-on-error', action='store_true', dest='ignoreerrors', default=True, @@ -300,15 +300,22 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): selection.add_option( '--date', metavar='DATE', dest='date', default=None, - help='Download only videos uploaded in this date') + help=( + '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)?"')) selection.add_option( '--datebefore', metavar='DATE', dest='datebefore', default=None, - help='Download only videos uploaded on or before this date (i.e. inclusive)') + help=( + 'Download only videos uploaded on or before this date. ' + 'The date formats accepted is the same as --date')) selection.add_option( '--dateafter', metavar='DATE', dest='dateafter', default=None, - help='Download only videos uploaded on or after this date (i.e. inclusive)') + help=( + 'Download only videos uploaded on or after this date. ' + 'The date formats accepted is the same as --date')) selection.add_option( '--min-views', metavar='COUNT', dest='min_views', default=None, type=int, @@ -420,7 +427,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): action='store', dest='format', metavar='FORMAT', default=None, help='Video format code, see "FORMAT SELECTION" for more details') video_format.add_option( - '-S', '--format-sort', + '-S', '--format-sort', metavar='SORTORDER', dest='format_sort', default=[], action='callback', callback=_comma_separated_values_options_callback, type='str', help='Sort the formats by the fields given, see "Sorting Formats" for more details') @@ -545,13 +552,13 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): dest='fragment_retries', metavar='RETRIES', default=10, help='Number of retries for a fragment (default is %default), or "infinite" (DASH, hlsnative and ISM)') downloader.add_option( - '--skip-unavailable-fragments','--no-abort-on-unavailable-fragment', + '--skip-unavailable-fragments', '--no-abort-on-unavailable-fragment', action='store_true', dest='skip_unavailable_fragments', default=True, help='Skip unavailable fragments for DASH, hlsnative and ISM (default)') downloader.add_option( '--abort-on-unavailable-fragment', '--no-skip-unavailable-fragments', action='store_false', dest='skip_unavailable_fragments', - help='Abort downloading when some fragment is not available') + help='Abort downloading when some fragment is unavailable') downloader.add_option( '--keep-fragments', action='store_true', dest='keep_fragments', default=False, @@ -588,7 +595,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): help='Download playlist videos in reverse order') downloader.add_option( '--no-playlist-reverse', - action='store_false', dest='playlist_reverse', + action='store_false', dest='playlist_reverse', help='Download playlist videos in default order (default)') downloader.add_option( '--playlist-random', @@ -617,7 +624,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): dest='external_downloader', metavar='COMMAND', help=( 'Use the specified external downloader. ' - 'Currently supports %s' % ','.join(list_external_downloaders()) )) + 'Currently supports %s' % ','.join(list_external_downloaders()))) downloader.add_option( '--external-downloader-args', dest='external_downloader_args', metavar='ARGS', @@ -670,7 +677,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): '(maximum possible number of seconds to sleep). Must only be used ' 'along with --min-sleep-interval.')) workarounds.add_option( - '--sleep-subtitles', + '--sleep-subtitles', metavar='SECONDS', dest='sleep_interval_subtitles', default=0, type=int, help='Enforce sleep interval on subtitles as well') @@ -731,14 +738,14 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): '-J', '--dump-single-json', action='store_true', dest='dump_single_json', default=False, help=( - 'Simulate, quiet but print JSON information for each command-line argument.' + 'Simulate, quiet but print JSON information for each command-line argument. ' 'If the URL refers to a playlist, dump the whole playlist information in a single line.')) verbosity.add_option( '--print-json', action='store_true', dest='print_json', default=False, help='Be quiet and print the video information as JSON (video is still being downloaded).') verbosity.add_option( - '--force-write-download-archive', '--force-write-archive', '--force-download-archive', + '--force-write-archive', '--force-write-download-archive', '--force-download-archive', action='store_true', dest='force_write_download_archive', default=False, help=( 'Force download archive entries to be written as far as no errors occur,' @@ -900,7 +907,8 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): action='store_true', dest='rm_cachedir', help='Delete all filesystem cache files') filesystem.add_option( - '--trim-file-name', dest='trim_file_name', default=0, type=int, + '--trim-file-name', metavar='LENGTH', + dest='trim_file_name', default=0, type=int, help='Limit the filename length (extension excluded)') thumbnail = optparse.OptionGroup(parser, 'Thumbnail Images') @@ -955,7 +963,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): '--remux-video', metavar='FORMAT', dest='remuxvideo', default=None, help=( - 'Remux the video into another container if necessary (currently supported: mp4|mkv). ' + 'Remux the video into another container if necessary (currently supported: mp4|mkv). ' 'If target container does not support the video/audio codec, remuxing will fail')) postproc.add_option( '--recode-video', @@ -1048,39 +1056,39 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): metavar='FORMAT', dest='convertsubtitles', default=None, help='Convert the subtitles to other format (currently supported: srt|ass|vtt|lrc)') - extractor = optparse.OptionGroup(parser, 'SponSkrub Options (SponsorBlock)') - extractor.add_option( + sponskrub = optparse.OptionGroup(parser, 'SponSkrub Options (SponsorBlock)') + sponskrub.add_option( '--sponskrub', action='store_true', dest='sponskrub', default=None, help=( 'Use sponskrub to mark sponsored sections with the data available in SponsorBlock API. ' 'This is enabled by default if the sponskrub binary exists (Youtube only)')) - extractor.add_option( + sponskrub.add_option( '--no-sponskrub', action='store_false', dest='sponskrub', help='Do not use sponskrub') - extractor.add_option( + sponskrub.add_option( '--sponskrub-cut', default=False, action='store_true', dest='sponskrub_cut', help='Cut out the sponsor sections instead of simply marking them') - extractor.add_option( + sponskrub.add_option( '--no-sponskrub-cut', action='store_false', dest='sponskrub_cut', help='Simply mark the sponsor sections, not cut them out (default)') - extractor.add_option( + sponskrub.add_option( '--sponskrub-force', default=False, action='store_true', dest='sponskrub_force', help='Run sponskrub even if the video was already downloaded') - extractor.add_option( + sponskrub.add_option( '--no-sponskrub-force', action='store_true', dest='sponskrub_force', help='Do not cut out the sponsor sections if the video was already downloaded (default)') - extractor.add_option( + sponskrub.add_option( '--sponskrub-location', metavar='PATH', dest='sponskrub_path', default='', help='Location of the sponskrub binary; either the path to the binary or its containing directory.') - extractor.add_option( - '--sponskrub-args', dest='sponskrub_args', + sponskrub.add_option( + '--sponskrub-args', dest='sponskrub_args', metavar='ARGS', help='Give these arguments to sponskrub') extractor = optparse.OptionGroup(parser, 'Extractor Options') @@ -1108,6 +1116,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser): parser.add_option_group(authentication) parser.add_option_group(adobe_pass) parser.add_option_group(postproc) + parser.add_option_group(sponskrub) parser.add_option_group(extractor) if overrideArguments is not None: diff --git a/youtube_dlc/postprocessor/embedthumbnail.py b/youtube_dlc/postprocessor/embedthumbnail.py index f73f93a58b..94e3eca981 100644 --- a/youtube_dlc/postprocessor/embedthumbnail.py +++ b/youtube_dlc/postprocessor/embedthumbnail.py @@ -76,7 +76,7 @@ def is_webp(path): if info['ext'] == 'mp3': options = [ - '-c', 'copy', '-map', '0:0', '-map', '1:0', '-id3v2_version', '3', + '-c', 'copy', '-map', '0:0', '-map', '1:0', '-id3v2_version', '3', '-metadata:s:v', 'title="Album cover"', '-metadata:s:v', 'comment="Cover (front)"'] self._downloader.to_screen('[ffmpeg] Adding thumbnail to "%s"' % filename) diff --git a/youtube_dlc/utils.py b/youtube_dlc/utils.py index 21e3481a0f..6a04b710e3 100644 --- a/youtube_dlc/utils.py +++ b/youtube_dlc/utils.py @@ -2323,8 +2323,8 @@ def bug_reports_message(): if ytdl_is_updateable(): update_cmd = 'type youtube-dlc -U to update' else: - update_cmd = 'see https://github.com/blackjack4494/yt-dlc on how to update' - msg = '; please report this issue on https://github.com/blackjack4494/yt-dlc .' + update_cmd = 'see https://github.com/pukkandan/yt-dlc on how to update' + msg = '; please report this issue on https://github.com/pukkandan/yt-dlc .' msg += ' Make sure you are using the latest version; %s.' % update_cmd msg += ' Be sure to call youtube-dlc with the --verbose flag and include its complete output.' return msg @@ -5734,6 +5734,7 @@ def random_birthday(year_field, month_field, day_field): day_field: str(random_date.day), } + # Templates for internet shortcut files, which are plain text files. DOT_URL_LINK_TEMPLATE = ''' [InternetShortcut] @@ -5812,6 +5813,7 @@ def to_high_limit_path(path): return path + def format_field(obj, field, template='%s', ignore=(None, ''), default='', func=None): val = obj.get(field, default) if func and val not in ignore: diff --git a/youtube_dlc/version.py b/youtube_dlc/version.py index 201a981cf9..2d59cb7dcc 100644 --- a/youtube_dlc/version.py +++ b/youtube_dlc/version.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -__version__ = '2020.11.11-2' +__version__ = '2021.01.05-2' diff --git a/yt-dlc.sublime-project b/yt-dlc.sublime-project index a225b2442f..0ffdc674b2 100644 --- a/yt-dlc.sublime-project +++ b/yt-dlc.sublime-project @@ -12,7 +12,7 @@ { "path": ".", "name": "root-folder", - "folder_exclude_patterns": ["youtube_dl","youtube_dlc",".github"], + "folder_exclude_patterns": ["youtube_dl", "youtube_dlc", ".git", "build", "dist", "zip"], }, ] }