pax_global_header00006660000000000000000000000064142240033620014506gustar00rootroot0000000000000052 comment=dee1d65dc362f69b28287b2e82d93be4d22d1968 yt-dlp-2022.04.08/000077500000000000000000000000001422400336200133165ustar00rootroot00000000000000yt-dlp-2022.04.08/.editorconfig000066400000000000000000000002061422400336200157710ustar00rootroot00000000000000root = true [**.py] charset = utf-8 indent_size = 4 indent_style = space trim_trailing_whitespace = true insert_final_newline = true yt-dlp-2022.04.08/.gitattributes000066400000000000000000000001531422400336200162100ustar00rootroot00000000000000* text=auto Makefile* text whitespace=-tab-in-indent *.sh text eol=lf *.md diff=markdown *.py diff=python yt-dlp-2022.04.08/.github/000077500000000000000000000000001422400336200146565ustar00rootroot00000000000000yt-dlp-2022.04.08/.github/FUNDING.yml000066400000000000000000000013201422400336200164670ustar00rootroot00000000000000# These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: ['https://github.com/yt-dlp/yt-dlp/blob/master/Collaborators.md#collaborators'] yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/000077500000000000000000000000001422400336200170415ustar00rootroot00000000000000yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/1_broken_site.yml000066400000000000000000000062131422400336200223120ustar00rootroot00000000000000name: Broken site description: Report broken or misfunctioning site labels: [triage, site-bug] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a broken site required: true - label: I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required - type: input id: region attributes: label: Region description: "Enter the region the site is accessible from" placeholder: "India" - type: textarea id: description attributes: label: Description description: | Provide an explanation of your issue in an arbitrary form. Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output of yt-dlp **that clearly demonstrates the problem**. Add the `-vU` flag to your command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2022.04.08 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2022.04.08) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/2_site_support_request.yml000066400000000000000000000067641422400336200243320ustar00rootroot00000000000000name: Site support request description: Request support for a new site labels: [triage, site-request] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a new site support request required: true - label: I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've checked that none of provided URLs [violate any copyrights](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required - type: input id: region attributes: label: Region description: "Enter the region the site is accessible from" placeholder: "India" - type: textarea id: example-urls attributes: label: Example URLs description: | Provide all kinds of example URLs for which support should be added placeholder: | - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc validations: required: true - type: textarea id: description attributes: label: Description description: | Provide any additional information placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output **using one of the example URLs provided above**. Add the `-vU` flag to your command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2022.04.08 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2022.04.08) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/3_site_feature_request.yml000066400000000000000000000066221422400336200242430ustar00rootroot00000000000000name: Site feature request description: Request a new functionality for a supported site labels: [triage, site-enhancement] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a site feature request required: true - label: I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required - type: input id: region attributes: label: Region description: "Enter the region the site is accessible from" placeholder: "India" - type: textarea id: example-urls attributes: label: Example URLs description: | Example URLs that can be used to demonstrate the requested feature placeholder: | https://www.youtube.com/watch?v=BaW_jenozKc validations: required: true - type: textarea id: description attributes: label: Description description: | Provide an explanation of your site feature request in an arbitrary form. Please make sure the description is worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output of yt-dlp that demonstrates the need for the enhancement. Add the `-vU` flag to your command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2022.04.08 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2022.04.08) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/4_bug_report.yml000066400000000000000000000060401422400336200221570ustar00rootroot00000000000000name: Bug report description: Report a bug unrelated to any particular site or extractor labels: [triage, bug] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a bug unrelated to a specific site required: true - label: I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - type: textarea id: description attributes: label: Description description: | Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output of yt-dlp **that clearly demonstrates the problem**. Add the `-vU` flag to **your** command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2022.04.08 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2022.04.08) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/5_feature_request.yml000066400000000000000000000053671422400336200232260ustar00rootroot00000000000000name: Feature request description: Request a new functionality unrelated to any particular site or extractor labels: [triage, enhancement] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a feature request required: true - label: I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme) required: true - label: I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - type: textarea id: description attributes: label: Description description: | Provide an explanation of your site feature request in an arbitrary form. Please make sure the description is worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | If your feature request involves an existing yt-dlp command, provide the complete verbose output of that command. Add the `-vU` flag to **your** command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2021.12.01 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2021.12.01) render: shell yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/6_question.yml000066400000000000000000000051401422400336200216600ustar00rootroot00000000000000name: Ask question description: Ask yt-dlp related question labels: [question] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm asking a question and **not** reporting a bug/feature request required: true - label: I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme) required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions including closed ones required: true - type: textarea id: question attributes: label: Question description: | Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information and as much context and examples as possible. If your question contains "isn't working" or "can you add", this is most likely the wrong template. If you are in doubt if this is the right template, use another template! placeholder: WRITE QUESTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | If your question involves a yt-dlp command, provide the complete verbose output of that command. Add the `-vU` flag to **your** command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2021.12.01 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2021.12.01) render: shell yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000005271422400336200210350ustar00rootroot00000000000000blank_issues_enabled: false contact_links: - name: Get help from the community on Discord url: https://discord.gg/H5MNcFW63r about: Join the yt-dlp Discord for community-powered support! - name: Matrix Bridge to the Discord server url: https://matrix.to/#/#yt-dlp:matrix.org about: For those who do not want to use Discord yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/000077500000000000000000000000001422400336200200755ustar00rootroot00000000000000yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.yml000066400000000000000000000062161422400336200233510ustar00rootroot00000000000000name: Broken site description: Report broken or misfunctioning site labels: [triage, site-bug] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a broken site required: true - label: I've verified that I'm running yt-dlp version **%(version)s** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required - type: input id: region attributes: label: Region description: "Enter the region the site is accessible from" placeholder: "India" - type: textarea id: description attributes: label: Description description: | Provide an explanation of your issue in an arbitrary form. Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output of yt-dlp **that clearly demonstrates the problem**. Add the `-vU` flag to your command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version %(version)s (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (%(version)s) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/2_site_support_request.yml000066400000000000000000000067671422400336200253710ustar00rootroot00000000000000name: Site support request description: Request support for a new site labels: [triage, site-request] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a new site support request required: true - label: I've verified that I'm running yt-dlp version **%(version)s** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've checked that none of provided URLs [violate any copyrights](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required - type: input id: region attributes: label: Region description: "Enter the region the site is accessible from" placeholder: "India" - type: textarea id: example-urls attributes: label: Example URLs description: | Provide all kinds of example URLs for which support should be added placeholder: | - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc validations: required: true - type: textarea id: description attributes: label: Description description: | Provide any additional information placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output **using one of the example URLs provided above**. Add the `-vU` flag to your command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version %(version)s (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (%(version)s) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.yml000066400000000000000000000066251422400336200253020ustar00rootroot00000000000000name: Site feature request description: Request a new functionality for a supported site labels: [triage, site-enhancement] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a site feature request required: true - label: I've verified that I'm running yt-dlp version **%(version)s** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required - type: input id: region attributes: label: Region description: "Enter the region the site is accessible from" placeholder: "India" - type: textarea id: example-urls attributes: label: Example URLs description: | Example URLs that can be used to demonstrate the requested feature placeholder: | https://www.youtube.com/watch?v=BaW_jenozKc validations: required: true - type: textarea id: description attributes: label: Description description: | Provide an explanation of your site feature request in an arbitrary form. Please make sure the description is worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output of yt-dlp that demonstrates the need for the enhancement. Add the `-vU` flag to your command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version %(version)s (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (%(version)s) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.yml000066400000000000000000000060431422400336200232160ustar00rootroot00000000000000name: Bug report description: Report a bug unrelated to any particular site or extractor labels: [triage, bug] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a bug unrelated to a specific site required: true - label: I've verified that I'm running yt-dlp version **%(version)s** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've checked that all provided URLs are alive and playable in a browser required: true - label: I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - type: textarea id: description attributes: label: Description description: | Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | Provide the complete verbose output of yt-dlp **that clearly demonstrates the problem**. Add the `-vU` flag to **your** command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version %(version)s (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (%(version)s) render: shell validations: required: true yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/5_feature_request.yml000066400000000000000000000053701422400336200242540ustar00rootroot00000000000000name: Feature request description: Request a new functionality unrelated to any particular site or extractor labels: [triage, enhancement] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm reporting a feature request required: true - label: I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme) required: true - label: I've verified that I'm running yt-dlp version **%(version)s** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - type: textarea id: description attributes: label: Description description: | Provide an explanation of your site feature request in an arbitrary form. Please make sure the description is worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information, any suggested solutions, and as much context and examples as possible placeholder: WRITE DESCRIPTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | If your feature request involves an existing yt-dlp command, provide the complete verbose output of that command. Add the `-vU` flag to **your** command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2021.12.01 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2021.12.01) render: shell yt-dlp-2022.04.08/.github/ISSUE_TEMPLATE_tmpl/6_question.yml000066400000000000000000000051401422400336200227140ustar00rootroot00000000000000name: Ask question description: Ask yt-dlp related question labels: [question] body: - type: checkboxes id: checklist attributes: label: Checklist description: | Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp: options: - label: I'm asking a question and **not** reporting a bug/feature request required: true - label: I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme) required: true - label: I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue) required: true - label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions including closed ones required: true - type: textarea id: question attributes: label: Question description: | Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see [is-the-description-of-the-issue-itself-sufficient](https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide any additional information and as much context and examples as possible. If your question contains "isn't working" or "can you add", this is most likely the wrong template. If you are in doubt if this is the right template, use another template! placeholder: WRITE QUESTION HERE validations: required: true - type: textarea id: log attributes: label: Verbose log description: | If your question involves a yt-dlp command, provide the complete verbose output of that command. Add the `-vU` flag to **your** command line you run yt-dlp with (`yt-dlp -vU `), copy the WHOLE output and insert it below. It should look similar to this: placeholder: | [debug] Command-line config: ['-vU', 'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Portable config file: yt-dlp.conf [debug] Portable config: ['-i'] [debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252 [debug] yt-dlp version 2021.12.01 (exe) [debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0 [debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1 [debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets [debug] Proxy map: {} yt-dlp is up to date (2021.12.01) render: shell yt-dlp-2022.04.08/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000032431422400336200204610ustar00rootroot00000000000000## Please follow the guide below - You will be asked some questions, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *pull request* (like that [x]) - Use *Preview* tab to see how your *pull request* will actually look like --- ### Before submitting a *pull request* make sure you have: - [ ] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding conventions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions) - [ ] [Searched](https://github.com/yt-dlp/yt-dlp/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 yt-dlp each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options: - [ ] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/) - [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence) ### What is the purpose of your *pull request*? - [ ] Bug fix - [ ] Improvement - [ ] New extractor - [ ] New feature --- ### Description of your *pull request* and other information Explanation of your *pull request* in arbitrary form goes here. Please make sure the description explains the purpose and effect of your *pull request* and is worded well enough to be understood. Provide as much context and examples as possible. yt-dlp-2022.04.08/.github/banner.svg000066400000000000000000000603101422400336200166440ustar00rootroot00000000000000 yt-dlp-2022.04.08/.github/workflows/000077500000000000000000000000001422400336200167135ustar00rootroot00000000000000yt-dlp-2022.04.08/.github/workflows/build.yml000066400000000000000000000416331422400336200205440ustar00rootroot00000000000000name: Build on: workflow_dispatch jobs: build_unix: runs-on: ubuntu-latest outputs: version_suffix: ${{ steps.version_suffix.outputs.version_suffix }} ytdlp_version: ${{ steps.bump_version.outputs.ytdlp_version }} upload_url: ${{ steps.create_release.outputs.upload_url }} sha256_bin: ${{ steps.sha256_bin.outputs.sha256_bin }} sha512_bin: ${{ steps.sha512_bin.outputs.sha512_bin }} sha256_tar: ${{ steps.sha256_tar.outputs.sha256_tar }} sha512_tar: ${{ steps.sha512_tar.outputs.sha512_tar }} steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.8' - name: Install packages run: sudo apt-get -y install zip pandoc man - name: Set version suffix id: version_suffix env: PUSH_VERSION_COMMIT: ${{ secrets.PUSH_VERSION_COMMIT }} if: "env.PUSH_VERSION_COMMIT == ''" run: echo ::set-output name=version_suffix::$(date -u +"%H%M%S") - name: Bump version id: bump_version run: | python devscripts/update-version.py ${{ steps.version_suffix.outputs.version_suffix }} make issuetemplates - name: Push to release id: push_release run: | git config --global user.name github-actions git config --global user.email github-actions@example.com git add -u git commit -m "[version] update" -m "Created by: ${{ github.event.sender.login }}" -m ":ci skip all" git push origin --force ${{ github.event.ref }}:release echo ::set-output name=head_sha::$(git rev-parse HEAD) - name: Update master id: push_master env: PUSH_VERSION_COMMIT: ${{ secrets.PUSH_VERSION_COMMIT }} if: "env.PUSH_VERSION_COMMIT != ''" run: git push origin ${{ github.event.ref }} - name: Get Changelog id: get_changelog run: | changelog=$(cat Changelog.md | grep -oPz '(?s)(?<=### ${{ steps.bump_version.outputs.ytdlp_version }}\n{2}).+?(?=\n{2,3}###)') || true echo "changelog<> $GITHUB_ENV echo "$changelog" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - name: Build lazy extractors id: lazy_extractors run: python devscripts/make_lazy_extractors.py - name: Run Make run: make all tar - name: Get SHA2-256SUMS for yt-dlp id: sha256_bin run: echo "::set-output name=sha256_bin::$(sha256sum yt-dlp | awk '{print $1}')" - name: Get SHA2-256SUMS for yt-dlp.tar.gz id: sha256_tar run: echo "::set-output name=sha256_tar::$(sha256sum yt-dlp.tar.gz | awk '{print $1}')" - name: Get SHA2-512SUMS for yt-dlp id: sha512_bin run: echo "::set-output name=sha512_bin::$(sha512sum yt-dlp | awk '{print $1}')" - name: Get SHA2-512SUMS for yt-dlp.tar.gz id: sha512_tar run: echo "::set-output name=sha512_tar::$(sha512sum yt-dlp.tar.gz | awk '{print $1}')" - name: Install dependencies for pypi env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} if: "env.PYPI_TOKEN != ''" run: | python -m pip install --upgrade pip pip install setuptools wheel twine - name: Build and publish on pypi env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} if: "env.TWINE_PASSWORD != ''" run: | rm -rf dist/* python setup.py sdist bdist_wheel twine upload dist/* - name: Install SSH private key env: BREW_TOKEN: ${{ secrets.BREW_TOKEN }} if: "env.BREW_TOKEN != ''" uses: yt-dlp/ssh-agent@v0.5.3 with: ssh-private-key: ${{ env.BREW_TOKEN }} - name: Update Homebrew Formulae env: BREW_TOKEN: ${{ secrets.BREW_TOKEN }} if: "env.BREW_TOKEN != ''" run: | git clone git@github.com:yt-dlp/homebrew-taps taps/ python3 devscripts/update-formulae.py taps/Formula/yt-dlp.rb "${{ steps.bump_version.outputs.ytdlp_version }}" git -C taps/ config user.name github-actions git -C taps/ config user.email github-actions@example.com git -C taps/ commit -am 'yt-dlp: ${{ steps.bump_version.outputs.ytdlp_version }}' git -C taps/ push - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.bump_version.outputs.ytdlp_version }} release_name: yt-dlp ${{ steps.bump_version.outputs.ytdlp_version }} commitish: ${{ steps.push_release.outputs.head_sha }} body: | #### [A description of the various files]((https://github.com/yt-dlp/yt-dlp#release-files)) are in the README --- ### Changelog: ${{ env.changelog }} draft: false prerelease: false - name: Upload yt-dlp Unix binary id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./yt-dlp asset_name: yt-dlp asset_content_type: application/octet-stream - name: Upload Source tar uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./yt-dlp.tar.gz asset_name: yt-dlp.tar.gz asset_content_type: application/gzip build_macos: runs-on: macos-11 needs: build_unix outputs: sha256_macos: ${{ steps.sha256_macos.outputs.sha256_macos }} sha512_macos: ${{ steps.sha512_macos.outputs.sha512_macos }} sha256_macos_zip: ${{ steps.sha256_macos_zip.outputs.sha256_macos_zip }} sha512_macos_zip: ${{ steps.sha512_macos_zip.outputs.sha512_macos_zip }} steps: - uses: actions/checkout@v2 # In order to create a universal2 application, the version of python3 in /usr/bin has to be used - name: Install Requirements run: | brew install coreutils /usr/bin/python3 -m pip install -U --user pip Pyinstaller==4.10 -r requirements.txt - name: Bump version id: bump_version run: /usr/bin/python3 devscripts/update-version.py - name: Build lazy extractors id: lazy_extractors run: /usr/bin/python3 devscripts/make_lazy_extractors.py - name: Run PyInstaller Script run: /usr/bin/python3 pyinst.py --target-architecture universal2 --onefile - name: Upload yt-dlp MacOS binary id: upload-release-macos uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./dist/yt-dlp_macos asset_name: yt-dlp_macos asset_content_type: application/octet-stream - name: Get SHA2-256SUMS for yt-dlp_macos id: sha256_macos run: echo "::set-output name=sha256_macos::$(sha256sum dist/yt-dlp_macos | awk '{print $1}')" - name: Get SHA2-512SUMS for yt-dlp_macos id: sha512_macos run: echo "::set-output name=sha512_macos::$(sha512sum dist/yt-dlp_macos | awk '{print $1}')" - name: Run PyInstaller Script with --onedir run: | /usr/bin/python3 pyinst.py --target-architecture universal2 --onedir zip ./dist/yt-dlp_macos.zip ./dist/yt-dlp_macos - name: Upload yt-dlp MacOS onedir id: upload-release-macos-zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./dist/yt-dlp_macos.zip asset_name: yt-dlp_macos.zip asset_content_type: application/zip - name: Get SHA2-256SUMS for yt-dlp_macos.zip id: sha256_macos_zip run: echo "::set-output name=sha256_macos_zip::$(sha256sum dist/yt-dlp_macos.zip | awk '{print $1}')" - name: Get SHA2-512SUMS for yt-dlp_macos.zip id: sha512_macos_zip run: echo "::set-output name=sha512_macos_zip::$(sha512sum dist/yt-dlp_macos.zip | awk '{print $1}')" build_windows: runs-on: windows-latest needs: build_unix outputs: sha256_win: ${{ steps.sha256_win.outputs.sha256_win }} sha512_win: ${{ steps.sha512_win.outputs.sha512_win }} sha256_py2exe: ${{ steps.sha256_py2exe.outputs.sha256_py2exe }} sha512_py2exe: ${{ steps.sha512_py2exe.outputs.sha512_py2exe }} sha256_win_zip: ${{ steps.sha256_win_zip.outputs.sha256_win_zip }} sha512_win_zip: ${{ steps.sha512_win_zip.outputs.sha512_win_zip }} steps: - uses: actions/checkout@v2 # 3.8 is used for Win7 support - name: Set up Python 3.8 uses: actions/setup-python@v2 with: python-version: '3.8' - name: Install Requirements # Custom pyinstaller built with https://github.com/yt-dlp/pyinstaller-builds run: | python -m pip install --upgrade pip setuptools wheel py2exe pip install "https://yt-dlp.github.io/Pyinstaller-Builds/x86_64/pyinstaller-4.10-py3-none-any.whl" -r requirements.txt - name: Bump version id: bump_version env: version_suffix: ${{ needs.build_unix.outputs.version_suffix }} run: python devscripts/update-version.py ${{ env.version_suffix }} - name: Build lazy extractors id: lazy_extractors run: python devscripts/make_lazy_extractors.py - name: Run PyInstaller Script run: python pyinst.py - name: Upload yt-dlp.exe Windows binary id: upload-release-windows uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./dist/yt-dlp.exe asset_name: yt-dlp.exe asset_content_type: application/vnd.microsoft.portable-executable - name: Get SHA2-256SUMS for yt-dlp.exe id: sha256_win run: echo "::set-output name=sha256_win::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA256).Hash.ToLower())" - name: Get SHA2-512SUMS for yt-dlp.exe id: sha512_win run: echo "::set-output name=sha512_win::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA512).Hash.ToLower())" - name: Run PyInstaller Script with --onedir run: | python pyinst.py --onedir Compress-Archive -LiteralPath ./dist/yt-dlp -DestinationPath ./dist/yt-dlp_win.zip - name: Upload yt-dlp Windows onedir id: upload-release-windows-zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./dist/yt-dlp_win.zip asset_name: yt-dlp_win.zip asset_content_type: application/zip - name: Get SHA2-256SUMS for yt-dlp_win.zip id: sha256_win_zip run: echo "::set-output name=sha256_win_zip::$((Get-FileHash dist\yt-dlp_win.zip -Algorithm SHA256).Hash.ToLower())" - name: Get SHA2-512SUMS for yt-dlp_win.zip id: sha512_win_zip run: echo "::set-output name=sha512_win_zip::$((Get-FileHash dist\yt-dlp_win.zip -Algorithm SHA512).Hash.ToLower())" - name: Run py2exe Script run: python setup.py py2exe - name: Upload yt-dlp_min.exe Windows binary id: upload-release-windows-py2exe uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./dist/yt-dlp.exe asset_name: yt-dlp_min.exe asset_content_type: application/vnd.microsoft.portable-executable - name: Get SHA2-256SUMS for yt-dlp_min.exe id: sha256_py2exe run: echo "::set-output name=sha256_py2exe::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA256).Hash.ToLower())" - name: Get SHA2-512SUMS for yt-dlp_min.exe id: sha512_py2exe run: echo "::set-output name=sha512_py2exe::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA512).Hash.ToLower())" build_windows32: runs-on: windows-latest needs: build_unix outputs: sha256_win32: ${{ steps.sha256_win32.outputs.sha256_win32 }} sha512_win32: ${{ steps.sha512_win32.outputs.sha512_win32 }} steps: - uses: actions/checkout@v2 # 3.7 is used for Vista support. See https://github.com/yt-dlp/yt-dlp/issues/390 - name: Set up Python 3.7 32-Bit uses: actions/setup-python@v2 with: python-version: '3.7' architecture: 'x86' - name: Install Requirements run: | python -m pip install --upgrade pip setuptools wheel pip install "https://yt-dlp.github.io/Pyinstaller-Builds/i686/pyinstaller-4.10-py3-none-any.whl" -r requirements.txt - name: Bump version id: bump_version env: version_suffix: ${{ needs.build_unix.outputs.version_suffix }} run: python devscripts/update-version.py ${{ env.version_suffix }} - name: Build lazy extractors id: lazy_extractors run: python devscripts/make_lazy_extractors.py - name: Run PyInstaller Script for 32 Bit run: python pyinst.py - name: Upload Executable yt-dlp_x86.exe id: upload-release-windows32 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./dist/yt-dlp_x86.exe asset_name: yt-dlp_x86.exe asset_content_type: application/vnd.microsoft.portable-executable - name: Get SHA2-256SUMS for yt-dlp_x86.exe id: sha256_win32 run: echo "::set-output name=sha256_win32::$((Get-FileHash dist\yt-dlp_x86.exe -Algorithm SHA256).Hash.ToLower())" - name: Get SHA2-512SUMS for yt-dlp_x86.exe id: sha512_win32 run: echo "::set-output name=sha512_win32::$((Get-FileHash dist\yt-dlp_x86.exe -Algorithm SHA512).Hash.ToLower())" finish: runs-on: ubuntu-latest needs: [build_unix, build_windows, build_windows32, build_macos] steps: - name: Make SHA2-256SUMS file env: SHA256_BIN: ${{ needs.build_unix.outputs.sha256_bin }} SHA256_TAR: ${{ needs.build_unix.outputs.sha256_tar }} SHA256_WIN: ${{ needs.build_windows.outputs.sha256_win }} SHA256_PY2EXE: ${{ needs.build_windows.outputs.sha256_py2exe }} SHA256_WIN_ZIP: ${{ needs.build_windows.outputs.sha256_win_zip }} SHA256_WIN32: ${{ needs.build_windows32.outputs.sha256_win32 }} SHA256_MACOS: ${{ needs.build_macos.outputs.sha256_macos }} SHA256_MACOS_ZIP: ${{ needs.build_macos.outputs.sha256_macos_zip }} run: | echo "${{ env.SHA256_BIN }} yt-dlp" >> SHA2-256SUMS echo "${{ env.SHA256_TAR }} yt-dlp.tar.gz" >> SHA2-256SUMS echo "${{ env.SHA256_WIN }} yt-dlp.exe" >> SHA2-256SUMS echo "${{ env.SHA256_PY2EXE }} yt-dlp_min.exe" >> SHA2-256SUMS echo "${{ env.SHA256_WIN32 }} yt-dlp_x86.exe" >> SHA2-256SUMS echo "${{ env.SHA256_WIN_ZIP }} yt-dlp_win.zip" >> SHA2-256SUMS echo "${{ env.SHA256_MACOS }} yt-dlp_macos" >> SHA2-256SUMS echo "${{ env.SHA256_MACOS_ZIP }} yt-dlp_macos.zip" >> SHA2-256SUMS - name: Upload 256SUMS file id: upload-sums uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./SHA2-256SUMS asset_name: SHA2-256SUMS asset_content_type: text/plain - name: Make SHA2-512SUMS file env: SHA512_BIN: ${{ needs.build_unix.outputs.sha512_bin }} SHA512_TAR: ${{ needs.build_unix.outputs.sha512_tar }} SHA512_WIN: ${{ needs.build_windows.outputs.sha512_win }} SHA512_PY2EXE: ${{ needs.build_windows.outputs.sha512_py2exe }} SHA512_WIN_ZIP: ${{ needs.build_windows.outputs.sha512_win_zip }} SHA512_WIN32: ${{ needs.build_windows32.outputs.sha512_win32 }} SHA512_MACOS: ${{ needs.build_macos.outputs.sha512_macos }} SHA512_MACOS_ZIP: ${{ needs.build_macos.outputs.sha512_macos_zip }} run: | echo "${{ env.SHA512_BIN }} yt-dlp" >> SHA2-512SUMS echo "${{ env.SHA512_TAR }} yt-dlp.tar.gz" >> SHA2-512SUMS echo "${{ env.SHA512_WIN }} yt-dlp.exe" >> SHA2-512SUMS echo "${{ env.SHA512_WIN_ZIP }} yt-dlp_win.zip" >> SHA2-512SUMS echo "${{ env.SHA512_PY2EXE }} yt-dlp_min.exe" >> SHA2-512SUMS echo "${{ env.SHA512_WIN32 }} yt-dlp_x86.exe" >> SHA2-512SUMS echo "${{ env.SHA512_MACOS }} yt-dlp_macos" >> SHA2-512SUMS echo "${{ env.SHA512_MACOS_ZIP }} yt-dlp_macos.zip" >> SHA2-512SUMS - name: Upload 512SUMS file id: upload-512sums uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.build_unix.outputs.upload_url }} asset_path: ./SHA2-512SUMS asset_name: SHA2-512SUMS asset_content_type: text/plain yt-dlp-2022.04.08/.github/workflows/core.yml000066400000000000000000000016541422400336200203740ustar00rootroot00000000000000name: Core Tests on: [push, pull_request] jobs: tests: name: Core Tests if: "!contains(github.event.head_commit.message, 'ci skip')" runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-18.04] # py3.9 is in quick-test python-version: [3.7, 3.8, 3.10-dev, pypy-3.6, pypy-3.7] run-tests-ext: [sh] include: # atleast one of the tests must be in windows - os: windows-latest python-version: 3.6 run-tests-ext: bat steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install pytest run: pip install pytest - name: Run tests continue-on-error: False run: ./devscripts/run_tests.${{ matrix.run-tests-ext }} core # Linter is in quick-test yt-dlp-2022.04.08/.github/workflows/download.yml000066400000000000000000000015111422400336200212430ustar00rootroot00000000000000name: Download Tests on: [push, pull_request] jobs: tests: name: Download Tests if: "contains(github.event.head_commit.message, 'ci run dl')" runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: os: [ubuntu-18.04] python-version: [3.7, 3.8, 3.9, 3.10-dev, pypy-3.6, pypy-3.7] run-tests-ext: [sh] include: - os: windows-latest python-version: 3.6 run-tests-ext: bat steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install pytest run: pip install pytest - name: Run tests continue-on-error: true run: ./devscripts/run_tests.${{ matrix.run-tests-ext }} download yt-dlp-2022.04.08/.github/workflows/quick-test.yml000066400000000000000000000016261422400336200215340ustar00rootroot00000000000000name: Quick Test on: [push, pull_request] jobs: tests: name: Core Test if: "!contains(github.event.head_commit.message, 'ci skip all')" 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 test requirements run: pip install pytest pycryptodomex - name: Run tests run: ./devscripts/run_tests.sh core flake8: name: Linter if: "!contains(github.event.head_commit.message, 'ci skip all')" 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: Make lazy extractors run: python devscripts/make_lazy_extractors.py - name: Run flake8 run: flake8 . yt-dlp-2022.04.08/.gitignore000066400000000000000000000023151422400336200153070ustar00rootroot00000000000000# Config *.conf cookies *cookies.txt .netrc # Downloaded *.annotations.xml *.aria2 *.description *.dump *.frag *.frag.aria2 *.frag.urls *.info.json *.live_chat.json *.meta *.part* *.tmp *.temp *.unknown_video *.ytdl .cache/ *.3gp *.ape *.ass *.avi *.desktop *.flac *.flv *.jpeg *.jpg *.m4a *.m4v *.mhtml *.mkv *.mov *.mp3 *.mp4 *.ogg *.opus *.png *.sbv *.srt *.swf *.swp *.ttml *.url *.vtt *.wav *.webloc *.webm *.webp # Allow config/media files in testdata !test/** # Python *.pyc *.pyo .pytest_cache wine-py2exe/ py2exe.log build/ dist/ zip/ tmp/ venv/ completions/ # Misc *~ *.DS_Store *.kate-swp MANIFEST test/local_parameters.json .coverage cover/ secrets/ updates_key.pem *.egg-info .tox *.class # Generated AUTHORS README.txt .mailmap *.1 *.bash-completion *.fish *.tar.gz *.zsh *.spec test/testdata/sigs/player-*.js # Binary /youtube-dl /youtube-dlc /yt-dlp yt-dlp.zip *.exe # Text Editor / IDE .idea *.iml .vscode *.sublime-* *.code-workspace # Lazy extractors */extractor/lazy_extractors.py # Plugins ytdlp_plugins/extractor/* !ytdlp_plugins/extractor/__init__.py !ytdlp_plugins/extractor/sample.py ytdlp_plugins/postprocessor/* !ytdlp_plugins/postprocessor/__init__.py !ytdlp_plugins/postprocessor/sample.py yt-dlp-2022.04.08/CONTRIBUTING.md000066400000000000000000001005361422400336200155540ustar00rootroot00000000000000# CONTRIBUTING TO YT-DLP - [OPENING AN ISSUE](#opening-an-issue) - [Is the description of the issue itself sufficient?](#is-the-description-of-the-issue-itself-sufficient) - [Are you using the latest version?](#are-you-using-the-latest-version) - [Is the issue already documented?](#is-the-issue-already-documented) - [Why are existing options not enough?](#why-are-existing-options-not-enough) - [Have you read and understood the changes, between youtube-dl and yt-dlp](#have-you-read-and-understood-the-changes-between-youtube-dl-and-yt-dlp) - [Is there enough context in your bug report?](#is-there-enough-context-in-your-bug-report) - [Does the issue involve one problem, and one problem only?](#does-the-issue-involve-one-problem-and-one-problem-only) - [Is anyone going to need the feature?](#is-anyone-going-to-need-the-feature) - [Is your question about yt-dlp?](#is-your-question-about-yt-dlp) - [Are you willing to share account details if needed?](#are-you-willing-to-share-account-details-if-needed) - [Is the website primarily used for piracy](#is-the-website-primarily-used-for-piracy) - [DEVELOPER INSTRUCTIONS](#developer-instructions) - [Adding new feature or making overarching changes](#adding-new-feature-or-making-overarching-changes) - [Adding support for a new site](#adding-support-for-a-new-site) - [yt-dlp coding conventions](#yt-dlp-coding-conventions) - [Mandatory and optional metafields](#mandatory-and-optional-metafields) - [Provide fallbacks](#provide-fallbacks) - [Regular expressions](#regular-expressions) - [Long lines policy](#long-lines-policy) - [Quotes](#quotes) - [Inline values](#inline-values) - [Collapse fallbacks](#collapse-fallbacks) - [Trailing parentheses](#trailing-parentheses) - [Use convenience conversion and parsing functions](#use-convenience-conversion-and-parsing-functions) - [My pull request is labeled pending-fixes](#my-pull-request-is-labeled-pending-fixes) - [EMBEDDING YT-DLP](README.md#embedding-yt-dlp) # OPENING AN ISSUE Bugs and suggestions should be reported at: [yt-dlp/yt-dlp/issues](https://github.com/yt-dlp/yt-dlp/issues). Unless you were prompted to or there is another pertinent reason (e.g. GitHub fails to accept the bug report), please do not send bug reports via personal email. For discussions, join us in our [discord server](https://discord.gg/H5MNcFW63r). **Please include the full output of yt-dlp when run with `-vU`**, i.e. **add** `-vU` flag to **your command line**, copy the **whole** output and post it in the issue body wrapped in \`\`\` for better formatting. It should look similar to this: ``` $ yt-dlp -vU [debug] Command-line config: ['-v', 'demo.com'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] yt-dlp version 2021.09.25 (zip) [debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.0-74-generic-x86_64-with-glibc2.29 [debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4 [debug] Proxy map: {} Current Build Hash 25cc412d1d3c0725a1f2f5b7e4682f6fb40e6d15f7024e96f7afd572e9919535 yt-dlp is up to date (2021.09.25) ... ``` **Do not post screenshots of verbose logs; only plain text is acceptable.** The output (including the first lines) contains important debugging information. Issues without the full output are often not reproducible and therefore will be closed as `incomplete`. The templates provided for the Issues, should be completed and **not removed**, this helps aide the resolution of the issue. Please re-read your issue once again to avoid a couple of common mistakes (you can and should use this as a checklist): ### Is the description of the issue itself sufficient? We often get issue reports that we cannot really decipher. While in most cases we eventually get the required information after asking back multiple times, this poses an unnecessary drain on our resources. So please elaborate on what feature you are requesting, or what bug you want to be fixed. Make sure that it's obvious - What the problem is - How it could be fixed - How your proposed solution would look like If your report is shorter than two lines, it is almost certainly missing some of these, which makes it hard for us to respond to it. We're often too polite to close the issue outright, but the missing info makes misinterpretation likely. We often get frustrated by these issues, since the only possible way for us to move forward on them is to ask for clarification over and over. For bug reports, this means that your report should contain the **complete** output of yt-dlp when called with the `-vU` flag. The error message you get for (most) bugs even says so, but you would not believe how many of our bug reports do not contain this information. If the error is `ERROR: Unable to extract ...` and you cannot reproduce it from multiple countries, add `--write-pages` and upload the `.dump` files you get [somewhere](https://gist.github.com). **Site support requests must contain an example URL**. An example URL is a URL you might want to download, like `https://www.youtube.com/watch?v=BaW_jenozKc`. There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. `https://www.youtube.com/`) is *not* an example URL. ### Are you using the latest version? Before reporting any issue, type `yt-dlp -U`. This should report that you're up-to-date. This goes for feature requests as well. ### Is the issue already documented? Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or browse the [GitHub Issues](https://github.com/yt-dlp/yt-dlp/search?type=Issues) of this repository. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2021.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity. Additionally, it is also helpful to see if the issue has already been documented in the [youtube-dl issue tracker](https://github.com/ytdl-org/youtube-dl/issues). If similar issues have already been reported in youtube-dl (but not in our issue tracker), links to them can be included in your issue report here. ### Why are existing options not enough? Before requesting a new feature, please have a quick peek at [the list of supported options](README.md#usage-and-options). Many feature requests are for features that actually exist already! Please, absolutely do show off your work in the issue report and detail how the existing similar options do *not* solve your problem. ### Have you read and understood the changes, between youtube-dl and yt-dlp There are many changes between youtube-dl and yt-dlp [(changes to default behavior)](README.md#differences-in-default-behavior), and some of the options available have a different behaviour in yt-dlp, or have been removed all together [(list of changes to options)](README.md#deprecated-options). Make sure you have read and understand the differences in the options and how this may impact your downloads before opening an issue. ### Is there enough context in your bug report? People want to solve problems, and often think they do us a favor by breaking down their larger problems (e.g. wanting to skip already downloaded files) to a specific request (e.g. requesting us to look whether the file exists before downloading the info page). However, what often happens is that they break down the problem into two steps: One simple, and one impossible (or extremely complicated one). We are then presented with a very complicated request when the original problem could be solved far easier, e.g. by recording the downloaded video IDs in a separate file. To avoid this, you must include the greater context where it is non-obvious. In particular, every feature request that does not consist of adding support for a new site should contain a use case scenario that explains in what situation the missing feature would be useful. ### Does the issue involve one problem, and one problem only? Some of our users seem to think there is a limit of issues they can or should open. There is no limit of issues they can or should open. While it may seem appealing to be able to dump all your issues into one ticket, that means that someone who solves one of your issues cannot mark the issue as closed. Typically, reporting a bunch of issues leads to the ticket lingering since nobody wants to attack that behemoth, until someone mercifully splits the issue into multiple ones. In particular, every site support request issue should only pertain to services at one site (generally under a common domain, but always using the same backend technology). Do not request support for vimeo user videos, White house podcasts, and Google Plus pages in the same issue. Also, make sure that you don't post bug reports alongside feature requests. As a rule of thumb, a feature request does not include outputs of yt-dlp that are not immediately related to the feature at hand. Do not post reports of a network error alongside the request for a new video service. ### Is anyone going to need the feature? Only post features that you (or an incapacitated friend you can personally talk to) require. Do not post features because they seem like a good idea. If they are really useful, they will be requested by someone who requires them. ### Is your question about yt-dlp? Some bug reports are completely unrelated to yt-dlp and relate to a different, or even the reporter's own, application. Please make sure that you are actually using yt-dlp. If you are using a UI for yt-dlp, report the bug to the maintainer of the actual application providing the UI. In general, if you are unable to provide the verbose log, you should not be opening the issue here. If the issue is with `youtube-dl` (the upstream fork of yt-dlp) and not with yt-dlp, the issue should be raised in the youtube-dl project. ### Are you willing to share account details if needed? The maintainers and potential contributors of the project often do not have an account for the website you are asking support for. So any developer interested in solving your issue may ask you for account details. It is your personal discretion whether you are willing to share the account in order for the developer to try and solve your issue. However, if you are unwilling or unable to provide details, they obviously cannot work on the issue and it cannot be solved unless some developer who both has an account and is willing/able to contribute decides to solve it. By sharing an account with anyone, you agree to bear all risks associated with it. The maintainers and yt-dlp can't be held responsible for any misuse of the credentials. While these steps won't necessarily ensure that no misuse of the account takes place, these are still some good practices to follow. - Look for people with `Member` (maintainers of the project) or `Contributor` (people who have previously contributed code) tag on their messages. - Change the password before sharing the account to something random (use [this](https://passwordsgenerator.net/) if you don't have a random password generator). - Change the password after receiving the account back. ### Is the website primarily used for piracy? We follow [youtube-dl's policy](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) to not support services that is primarily used for infringing copyright. Additionally, it has been decided to not to support porn sites that specialize in deep fake. We also cannot support any service that serves only [DRM protected content](https://en.wikipedia.org/wiki/Digital_rights_management). # DEVELOPER INSTRUCTIONS Most users do not need to build yt-dlp and can [download the builds](https://github.com/yt-dlp/yt-dlp/releases) or get them via [the other installation methods](README.md#installation). To run yt-dlp as a developer, you don't need to build anything either. Simply execute python -m yt_dlp To run the test, simply invoke your favorite test runner, or execute a test file directly; any of the following work: python -m unittest discover python test/test_download.py nosetests pytest See item 6 of [new extractor tutorial](#adding-support-for-a-new-site) for how to run extractor specific test cases. If you want to create a build of yt-dlp yourself, you can follow the instructions [here](README.md#compile). ## Adding new feature or making overarching changes Before you start writing code for implementing a new feature, open an issue explaining your feature request and atleast one use case. This allows the maintainers to decide whether such a feature is desired for the project in the first place, and will provide an avenue to discuss some implementation details. If you open a pull request for a new feature without discussing with us first, do not be surprised when we ask for large changes to the code, or even reject it outright. The same applies for changes to the documentation, code style, or overarching changes to the architecture ## Adding support for a new site If you want to add support for a new site, first of all **make sure** this site is **not dedicated to [copyright infringement](https://www.github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. yt-dlp does **not support** such sites thus pull requests adding support for them **will be rejected**. After you have ensured this site is distributing its content legally, you can follow this quick list (assuming your service is called `yourextractor`): 1. [Fork this repository](https://github.com/yt-dlp/yt-dlp/fork) 1. Check out the source code with: git clone git@github.com:YOUR_GITHUB_USERNAME/yt-dlp.git 1. Start a new git branch with cd yt-dlp git checkout -b yourextractor 1. Start with this simple template and save it to `yt_dlp/extractor/yourextractor.py`: ```python # coding: utf-8 from .common import InfoExtractor class YourExtractorIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?yourextractor\.com/watch/(?P[0-9]+)' _TESTS = [{ 'url': 'https://yourextractor.com/watch/42', 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', 'info_dict': { 'id': '42', 'ext': 'mp4', 'title': 'Video title goes here', 'thumbnail': r're:^https?://.*\.jpg$', # TODO more properties, either as: # * A value # * MD5 checksum; start the string with md5: # * A regular expression; start the string with re: # * Any Python type (for example int or float) } }] def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) # TODO more code goes here, for example ... title = self._html_search_regex(r'

(.+?)

', webpage, 'title') return { 'id': video_id, 'title': title, 'description': self._og_search_description(webpage), 'uploader': self._search_regex(r']+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False), # TODO more properties (see yt_dlp/extractor/common.py) } ``` 1. Add an import in [`yt_dlp/extractor/extractors.py`](yt_dlp/extractor/extractors.py). 1. Run `python test/test_download.py TestDownload.test_YourExtractor` (note that `YourExtractor` doesn't end with `IE`). This *should fail* at first, but you can continually re-run it until you're done. If you decide to add more than one test, the tests will then be named `TestDownload.test_YourExtractor`, `TestDownload.test_YourExtractor_1`, `TestDownload.test_YourExtractor_2`, etc. Note that tests with `only_matching` key in test's dict are not counted in. You can also run all the tests in one go with `TestDownload.test_YourExtractor_all` 1. Make sure you have atleast one test for your extractor. Even if all videos covered by the extractor are expected to be inaccessible for automated testing, tests should still be added with a `skip` parameter indicating why the particular test is disabled from running. 1. Have a look at [`yt_dlp/extractor/common.py`](yt_dlp/extractor/common.py) for possible helper methods and a [detailed description of what your extractor should and may return](yt_dlp/extractor/common.py#L91-L426). Add tests and code for as many as you want. 1. Make sure your code follows [yt-dlp coding conventions](#yt-dlp-coding-conventions) and check the code with [flake8](https://flake8.pycqa.org/en/latest/index.html#quickstart): $ flake8 yt_dlp/extractor/yourextractor.py 1. Make sure your code works under all [Python](https://www.python.org/) versions supported by yt-dlp, namely CPython and PyPy for Python 3.6 and above. Backward compatibility is not required for even older versions of Python. 1. When the tests pass, [add](https://git-scm.com/docs/git-add) the new files, [commit](https://git-scm.com/docs/git-commit) them and [push](https://git-scm.com/docs/git-push) the result, like this: $ git add yt_dlp/extractor/extractors.py $ git add yt_dlp/extractor/yourextractor.py $ git commit -m '[yourextractor] Add extractor' $ git push origin yourextractor 1. Finally, [create a pull request](https://help.github.com/articles/creating-a-pull-request). We'll then review and merge it. In any case, thank you very much for your contributions! **Tip:** To test extractors that require login information, create a file `test/local_parameters.json` and add `"usenetrc": true` or your username and password in it: ```json { "username": "your user name", "password": "your password" } ``` ## yt-dlp coding conventions This section introduces a guide lines for writing idiomatic, robust and future-proof extractor code. Extractors are very fragile by nature since they depend on the layout of the source data provided by 3rd party media hosters out of your control and this layout tends to change. As an extractor implementer your task is not only to write code that will extract media links and metadata correctly but also to minimize dependency on the source's layout and even to make the code foresee potential future changes and be ready for that. This is important because it will allow the extractor not to break on minor layout changes thus keeping old yt-dlp versions working. Even though this breakage issue may be easily fixed by a new version of yt-dlp, this could take some time, during which the the extractor will remain broken. ### Mandatory and optional metafields For extraction to work yt-dlp relies on metadata your extractor extracts and provides to yt-dlp expressed by an [information dictionary](yt_dlp/extractor/common.py#L91-L426) or simply *info dict*. Only the following meta fields in the *info dict* are considered mandatory for a successful extraction process by yt-dlp: - `id` (media identifier) - `title` (media title) - `url` (media download URL) or `formats` The aforementioned metafields are the critical data that the extraction does not make any sense without and if any of them fail to be extracted then the extractor is considered completely broken. While all extractors must return a `title`, they must also allow it's extraction to be non-fatal. For pornographic sites, appropriate `age_limit` must also be returned. The extractor is allowed to return the info dict without url or formats in some special cases if it allows the user to extract usefull information with `--ignore-no-formats-error` - Eg: when the video is a live stream that has not started yet. [Any field](yt_dlp/extractor/common.py#219-L426) apart from the aforementioned ones are considered **optional**. That means that extraction should be **tolerant** to situations when sources for these fields can potentially be unavailable (even if they are always available at the moment) and **future-proof** in order not to break the extraction of general purpose mandatory fields. #### Example Say you have some source dictionary `meta` that you've fetched as JSON with HTTP request and it has a key `summary`: ```python meta = self._download_json(url, video_id) ``` Assume at this point `meta`'s layout is: ```python { "summary": "some fancy summary text", "user": { "name": "uploader name" }, ... } ``` Assume you want to extract `summary` and put it into the resulting info dict as `description`. Since `description` is an optional meta field you should be ready that this key may be missing from the `meta` dict, so that you should extract it like: ```python description = meta.get('summary') # correct ``` and not like: ```python description = meta['summary'] # incorrect ``` The latter will break extraction process with `KeyError` if `summary` disappears from `meta` at some later time but with the former approach extraction will just go ahead with `description` set to `None` which is perfectly fine (remember `None` is equivalent to the absence of data). If the data is nested, do not use `.get` chains, but instead make use of the utility functions `try_get` or `traverse_obj` Considering the above `meta` again, assume you want to extract `["user"]["name"]` and put it in the resulting info dict as `uploader` ```python uploader = try_get(meta, lambda x: x['user']['name']) # correct ``` or ```python uploader = traverse_obj(meta, ('user', 'name')) # correct ``` and not like: ```python uploader = meta['user']['name'] # incorrect ``` or ```python uploader = meta.get('user', {}).get('name') # incorrect ``` Similarly, you should pass `fatal=False` when extracting optional data from a webpage with `_search_regex`, `_html_search_regex` or similar methods, for instance: ```python description = self._search_regex( r']+id="title"[^>]*>([^<]+)<', webpage, 'description', fatal=False) ``` With `fatal` set to `False` if `_search_regex` fails to extract `description` it will emit a warning and continue extraction. You can also pass `default=`, for example: ```python description = self._search_regex( r']+id="title"[^>]*>([^<]+)<', webpage, 'description', default=None) ``` On failure this code will silently continue the extraction with `description` set to `None`. That is useful for metafields that may or may not be present. Another thing to remember is not to try to iterate over `None` Say you extracted a list of thumbnails into `thumbnail_data` using `try_get` and now want to iterate over them ```python thumbnail_data = try_get(...) thumbnails = [{ 'url': item['url'] } for item in thumbnail_data or []] # correct ``` and not like: ```python thumbnail_data = try_get(...) thumbnails = [{ 'url': item['url'] } for item in thumbnail_data] # incorrect ``` In the later case, `thumbnail_data` will be `None` if the field was not found and this will cause the loop `for item in thumbnail_data` to raise a fatal error. Using `for item in thumbnail_data or []` avoids this error and results in setting an empty list in `thumbnails` instead. ### Provide fallbacks When extracting metadata try to do so from multiple sources. For example if `title` is present in several places, try extracting from at least some of them. This makes it more future-proof in case some of the sources become unavailable. #### Example Say `meta` from the previous example has a `title` and you are about to extract it. Since `title` is a mandatory meta field you should end up with something like: ```python title = meta['title'] ``` If `title` disappears from `meta` in future due to some changes on the hoster's side the extraction would fail since `title` is mandatory. That's expected. Assume that you have some another source you can extract `title` from, for example `og:title` HTML meta of a `webpage`. In this case you can provide a fallback scenario: ```python title = meta.get('title') or self._og_search_title(webpage) ``` This code will try to extract from `meta` first and if it fails it will try extracting `og:title` from a `webpage`. ### Regular expressions #### Don't capture groups you don't use Capturing group must be an indication that it's used somewhere in the code. Any group that is not used must be non capturing. ##### Example Don't capture id attribute name here since you can't use it for anything anyway. Correct: ```python r'(?:id|ID)=(?P\d+)' ``` Incorrect: ```python r'(id|ID)=(?P\d+)' ``` #### Make regular expressions relaxed and flexible When using regular expressions try to write them fuzzy, relaxed and flexible, skipping insignificant parts that are more likely to change, allowing both single and double quotes for quoted values and so on. ##### Example Say you need to extract `title` from the following HTML code: ```html some fancy title ``` The code for that task should look similar to: ```python title = self._search_regex( # correct r']+class="title"[^>]*>([^<]+)', webpage, 'title') ``` Or even better: ```python title = self._search_regex( # correct r']+class=(["\'])title\1[^>]*>(?P[^<]+)', webpage, 'title', group='title') ``` Note how you tolerate potential changes in the `style` attribute's value or switch from using double quotes to single for `class` attribute: The code definitely should not look like: ```python title = self._search_regex( # incorrect r'<span style="position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;" class="title">(.*?)</span>', webpage, 'title', group='title') ``` or even ```python title = self._search_regex( # incorrect r'<span style=".*?" class="title">(.*?)</span>', webpage, 'title', group='title') ``` Here the presence or absence of other attributes including `style` is irrelevent for the data we need, and so the regex must not depend on it ### Long lines policy There is a soft limit to keep lines of code under 100 characters long. This means it should be respected if possible and if it does not make readability and code maintenance worse. Sometimes, it may be reasonable to go upto 120 characters and sometimes even 80 can be unreadable. Keep in mind that this is not a hard limit and is just one of many tools to make the code more readable. For example, you should **never** split long string literals like URLs or some other often copied entities over multiple lines to fit this limit: Conversely, don't unecessarily split small lines further. As a rule of thumb, if removing the line split keeps the code under 80 characters, it should be a single line. ##### Examples Correct: ```python 'https://www.youtube.com/watch?v=FqZTN594JQw&list=PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4' ``` Incorrect: ```python 'https://www.youtube.com/watch?v=FqZTN594JQw&list=' 'PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4' ``` Correct: ```python uploader = traverse_obj(info, ('uploader', 'name'), ('author', 'fullname')) ``` Incorrect: ```python uploader = traverse_obj( info, ('uploader', 'name'), ('author', 'fullname')) ``` Correct: ```python formats = self._extract_m3u8_formats( m3u8_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', note='Downloading HD m3u8 information', errnote='Unable to download HD m3u8 information') ``` Incorrect: ```python formats = self._extract_m3u8_formats(m3u8_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', note='Downloading HD m3u8 information', errnote='Unable to download HD m3u8 information') ``` ### Quotes Always use single quotes for strings (even if the string has `'`) and double quotes for docstrings. Use `'''` only for multi-line strings. An exception can be made if a string has multiple single quotes in it and escaping makes it significantly harder to read. For f-strings, use you can use double quotes on the inside. But avoid f-strings that have too many quotes inside. ### Inline values Extracting variables is acceptable for reducing code duplication and improving readability of complex expressions. However, you should avoid extracting variables used only once and moving them to opposite parts of the extractor file, which makes reading the linear flow difficult. #### Example Correct: ```python title = self._html_search_regex(r'<h1>([^<]+)</h1>', webpage, 'title') ``` Incorrect: ```python TITLE_RE = r'<h1>([^<]+)</h1>' # ...some lines of code... title = self._html_search_regex(TITLE_RE, webpage, 'title') ``` ### Collapse fallbacks Multiple fallback values can quickly become unwieldy. Collapse multiple fallback values into a single expression via a list of patterns. #### Example Good: ```python description = self._html_search_meta( ['og:description', 'description', 'twitter:description'], webpage, 'description', default=None) ``` Unwieldy: ```python description = ( self._og_search_description(webpage, default=None) or self._html_search_meta('description', webpage, default=None) or self._html_search_meta('twitter:description', webpage, default=None)) ``` Methods supporting list of patterns are: `_search_regex`, `_html_search_regex`, `_og_search_property`, `_html_search_meta`. ### Trailing parentheses Always move trailing parentheses used for grouping/functions after the last argument. On the other hand, literal list/tuple/dict/set should closed be in a new line. Generators and list/dict comprehensions may use either style #### Examples Correct: ```python url = try_get( info, lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], list) ``` Correct: ```python url = try_get(info, lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], list) ``` Incorrect: ```python url = try_get( info, lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], list, ) ``` Correct: ```python f = { 'url': url, 'format_id': format_id, } ``` Incorrect: ```python f = {'url': url, 'format_id': format_id} ``` Correct: ```python formats = [process_formats(f) for f in format_data if f.get('type') in ('hls', 'dash', 'direct') and f.get('downloadable')] ``` Correct: ```python formats = [ process_formats(f) for f in format_data if f.get('type') in ('hls', 'dash', 'direct') and f.get('downloadable') ] ``` ### Use convenience conversion and parsing functions Wrap all extracted numeric data into safe functions from [`yt_dlp/utils.py`](yt_dlp/utils.py): `int_or_none`, `float_or_none`. Use them for string to number conversions as well. Use `url_or_none` for safe URL processing. Use `traverse_obj` and `try_call` (superseeds `dict_get` and `try_get`) for safe metadata extraction from parsed JSON. Use `unified_strdate` for uniform `upload_date` or any `YYYYMMDD` meta field extraction, `unified_timestamp` for uniform `timestamp` extraction, `parse_filesize` for `filesize` extraction, `parse_count` for count meta fields extraction, `parse_resolution`, `parse_duration` for `duration` extraction, `parse_age_limit` for `age_limit` extraction. Explore [`yt_dlp/utils.py`](yt_dlp/utils.py) for more useful convenience functions. #### More examples ##### Safely extract optional description from parsed JSON ```python description = traverse_obj(response, ('result', 'video', 'summary'), expected_type=str) ``` ##### Safely extract more optional metadata ```python video = traverse_obj(response, ('result', 'video', 0), default={}, expected_type=dict) description = video.get('summary') duration = float_or_none(video.get('durationMs'), scale=1000) view_count = int_or_none(video.get('views')) ``` # My pull request is labeled pending-fixes The `pending-fixes` label is added when there are changes requested to a PR. When the necessary changes are made, the label should be removed. However, despite our best efforts, it may sometimes happen that the maintainer did not see the changes or forgot to remove the label. If your PR is still marked as `pending-fixes` a few days after all requested changes have been made, feel free to ping the maintainer who labeled your issue and ask them to re-review and remove the label. # EMBEDDING YT-DLP See [README.md#embedding-yt-dlp](README.md#embedding-yt-dlp) for instructions on how to embed yt-dlp in another Python program ������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/CONTRIBUTORS����������������������������������������������������������������������0000664�0000000�0000000�00000004540�14224003362�0015201�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pukkandan (owner) shirt-dev (collaborator) coletdjnz/colethedj (collaborator) Ashish0804 (collaborator) nao20010128nao/Lesmiscore (collaborator) h-h-h-h pauldubois98 nixxo GreyAlien502 kyuyeunk siikamiika jbruchon alexmerkel glenn-slayden Unrud wporr mariuszskon ohnonot samiksome alxnull FelixFrog Zocker1999NET kurumigi bbepis animelover1984/horahoradev Pccode66 RobinD42 hseg DennyDai codeasashu teesid kevinoconnor7 damianoamatruda 2ShedsJackson CXwudi xtkoba llacb47 hheimbuerger B0pol lkho fstirlitz Lamieur tsukumijima Hadi0609 b5eff52 craftingmod tpikonen tripulse king-millez alex-gedeon hhirtz louie-github MinePlayersPE olifre rhsmachine/zenerdi0de nihil-admirari krichbanana ohmybahgosh nyuszika7h blackjack4494 pyx TpmKranz mzbaulhaque zackmark29 mbway zerodytrash wesnm pento rigstot dirkf funniray Jessecar96 jhwgh1968 kikuyan max-te nchilada pgaig PSlava stdedos u-spec-png Sipherdrakon kidonng smege1001 tandy1000 IONECarter capntrips mrfade ParadoxGBB wlritchi NeroBurner mahanstreamer alerikaisattera Derkades BunnyHelp i6t std-move Chocobozzz ouwou korli octotherp CeruleanSky zootedb0t chao813 ChillingPepper ConquerorDopy dalanmiller DigitalDJ f4pp3rk1ng gesa Jules-A makeworld-the-better-one MKSherbini mrx23dot poschi3 raphaeldore renalid sleaux-meaux sulyi tmarki Vangelis66 AjaxGb ajj8 jakubadamw jfogelman timethrow sarnoud Bojidarist 18928172992817182/gustaf nixklai smplayer-dev Zirro CrypticSignal flashdagger fractalf frafra kaz-us ozburo rhendric sdomi selfisekai stanoarn 0xA7404A/Aurora 4a1e2y5 aarubui chio0hai cntrl-s Deer-Spangle DEvmIb Grabien/MaximVol j54vc1bk mpeter50 mrpapersonic pabs3 staubichsauger xenova Yakabuff zulaport ehoogeveen-medweb PilzAdam zmousm iw0nderhow unit193 TwoThousandHedgehogs/KathrynElrod Jertzukka cypheron Hyeeji bwildenhain C0D3D3V kebianizao Lapin0t abdullah-if DavidSkrundz mkubecek raleeper YuenSzeHong Sematre jaller94 r5d julien-hadleyjack git-anony-mouse mdawar trassshhub foghawk k3ns1n teridon mozlima timendum ischmidt20 CreaValix sian1468 arkamar hyano KiberInfinity tejing1 Bricio lazypete365 Aniruddh-J blackgear CplPwnies cyberfox1691 FestplattenSchnitzel hatienl0i261299 iphoting jakeogh lukasfink1 lyz-code marieell mdpauley Mipsters mxmehl ofkz P-reducible pycabbage regarten Ronnnny schn0sch s0u1h MrRawes cffswb danielyli 1-Byte mehq dzek69 aaearon panatexxa kmark un-def goggle Soebb Fam0r bohwaz dodrian vvto33 ����������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/Changelog.md����������������������������������������������������������������������0000664�0000000�0000000�00000434527�14224003362�0015546�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Changelog <!-- # Instuctions for creating release * Run `make doc` * Update Changelog.md and CONTRIBUTORS * Change "Based on ytdl" version in Readme.md if needed * Commit as `Release <version>` and push to master * Dispatch the workflow https://github.com/yt-dlp/yt-dlp/actions/workflows/build.yml on master --> ### 2022.04.08 * Use certificates from `certifi` if installed by [coletdjnz](https://github.com/coletdjnz) * Treat multiple `--match-filters` as OR * File locking improvevemnts: * Do not lock downloading file on Windows * Do not prevent download if locking is unsupported * Do not truncate files before locking by [jakeogh](https://github.com/jakeogh), [pukkandan](https://github.com/pukkandan) * Fix non-blocking non-exclusive lock * De-prioritize automatic-subtitles when no `--sub-lang` is given * Exit after `--dump-user-agent` * Fallback to video-only format when selecting by extension * Fix `--abort-on-error` for subtitles * Fix `--no-overwrite` for playlist infojson * Fix `--print` with `--ignore-no-formats` when url is `None` by [flashdagger](https://github.com/flashdagger) * Fix `--sleep-interval` * Fix `--throttled-rate` * Fix `autonumber` * Fix case of `http_headers` * Fix filepath sanitization in `--print-to-file` * Handle float in `--wait-for-video` * Ignore `mhtml` formats from `-f mergeall` * Ignore format-specific fields in initial pass of `--match-filter` * Protect stdout from unexpected progress and console-title * Remove `Accept-Encoding` header from `std_headers` by [coletdjnz](https://github.com/coletdjnz) * Remove incorrect warning for `--dateafter` * Show warning when all media formats have DRM * [downloader] Fix invocation of `HttpieFD` * [http] Fix #3215 * [http] Reject broken range before request by [Lesmiscore](https://github.com/Lesmiscore), [Jules-A](https://github.com/Jules-A), [pukkandan](https://github.com/pukkandan) * [fragment] Read downloaded fragments only when needed by [Lesmiscore](https://github.com/Lesmiscore) * [http] Retry on more errors by [coletdjnz](https://github.com/coletdjnz) * [mhtml] Fix fragments with absolute urls by [coletdjnz](https://github.com/coletdjnz) * [extractor] Add `_perform_login` function * [extractor] Allow control characters inside json * [extractor] Support merging subtitles with data by [coletdjnz](https://github.com/coletdjnz) * [generic] Extract subtitles from video.js by [Lesmiscore](https://github.com/Lesmiscore) * [ffmpeg] Cache version data * [FFmpegConcat] Ensure final directory exists * [FfmpegMetadata] Write id3v1 tags * [FFmpegVideoConvertor] Add more formats to `--remux-video` * [FFmpegVideoConvertor] Ensure all streams are copied * [MetadataParser] Validate outtmpl early * [outtmpl] Fix replacement/default when used with alternate * [outtmpl] Limit changes during sanitization * [phantomjs] Fix bug * [test] Add `test_locked_file` * [utils] `format_decimal_suffix`: Fix for very large numbers by [s0u1h](https://github.com/s0u1h) * [utils] `traverse_obj`: Allow filtering by value * [utils] Add `filter_dict`, `get_first`, `try_call` * [utils] ExtractorError: Fix for older python versions * [utils] WebSocketsWrapper: Allow omitting `__enter__` invocation by [Lesmiscore](https://github.com/Lesmiscore) * [docs] Add an `.editorconfig` file by [fstirlitz](https://github.com/fstirlitz) * [docs] Clarify the exact `BSD` license of dependencies by [MrRawes](https://github.com/MrRawes) * [docs] Minor improvements by [pukkandan](https://github.com/pukkandan), [cffswb](https://github.com/cffswb), [danielyli](https://github.com/danielyli) * [docs] Remove readthedocs * [build] Add `requirements.txt` to pip distributions * [cleanup, postprocessor] Create `_download_json` * [cleanup, vimeo] Fix tests * [cleanup] Misc fixes and minor cleanup * [cleanup] Use `_html_extract_title` * [AfreecaTV] Add `AfreecaTVUserIE` by [hatienl0i261299](https://github.com/hatienl0i261299) * [arte] Add `format_note` to m3u8 formats * [azmedien] Add TVO Online to supported hosts by [1-Byte](https://github.com/1-Byte) * [BanBye] Add extractor by [mehq](https://github.com/mehq) * [bilibili] Fix extraction of title with quotes by [dzek69](https://github.com/dzek69) * [Craftsy] Add extractor by [Bricio](https://github.com/Bricio) * [Cybrary] Add extractor by [aaearon](https://github.com/aaearon) * [Huya] Add extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [ITProTV] Add extractor by [aaearon](https://github.com/aaearon) * [Jable] Add extractors by [mehq](https://github.com/mehq) * [LastFM] Add extractors by [mehq](https://github.com/mehq) * [Moviepilot] Add extractor by [panatexxa](https://github.com/panatexxa) * [panopto] Add extractors by [coletdjnz](https://github.com/coletdjnz), [kmark](https://github.com/kmark) * [PokemonSoundLibrary] Add extractor by [Lesmiscore](https://github.com/Lesmiscore) * [WasdTV] Add extractor by [un-def](https://github.com/un-def), [hatienl0i261299](https://github.com/hatienl0i261299) * [adobepass] Fix Suddenlink MSO by [CplPwnies](https://github.com/CplPwnies) * [afreecatv] Match new vod url by [wlritchi](https://github.com/wlritchi) * [AZMedien] Support `tv.telezueri.ch` by [goggle](https://github.com/goggle) * [BiliIntl] Support user-generated videos by [wlritchi](https://github.com/wlritchi) * [BRMediathek] Fix VALID_URL * [crunchyroll:playlist] Implement beta API by [tejing1](https://github.com/tejing1) * [crunchyroll] Fix inheritance * [daftsex] Fix extractor by [Soebb](https://github.com/Soebb) * [dailymotion] Support `geo.dailymotion.com` by [hatienl0i261299](https://github.com/hatienl0i261299) * [ellentube] Extract subtitles from manifest * [elonet] Rewrite extractor by [Fam0r](https://github.com/Fam0r), [pukkandan](https://github.com/pukkandan) * [fptplay] Fix metadata extraction by [hatienl0i261299](https://github.com/hatienl0i261299) * [FranceCulture] Support playlists by [bohwaz](https://github.com/bohwaz) * [go, viu] Extract subtitles from the m3u8 manifest by [fstirlitz](https://github.com/fstirlitz) * [Imdb] Improve extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [MangoTV] Improve extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [Nebula] Fix bug in 52efa4b31200119adaa8acf33e50b84fcb6948f0 * [niconico] Fix extraction of thumbnails and uploader (#3266) * [niconico] Rewrite NiconicoIE by [Lesmiscore](https://github.com/Lesmiscore) * [nitter] Minor fixes and update instance list by [foghawk](https://github.com/foghawk) * [NRK] Extract timestamp by [hatienl0i261299](https://github.com/hatienl0i261299) * [openrec] Download archived livestreams by [Lesmiscore](https://github.com/Lesmiscore) * [openrec] Refactor extractors by [Lesmiscore](https://github.com/Lesmiscore) * [panopto] Improve subtitle extraction and support slides by [coletdjnz](https://github.com/coletdjnz) * [ParamountPlus, CBS] Change VALID_URL by [Sipherdrakon](https://github.com/Sipherdrakon) * [ParamountPlusSeries] Support multiple pages by [dodrian](https://github.com/dodrian) * [Piapro] Extract description with break lines by [Lesmiscore](https://github.com/Lesmiscore) * [rai] Fix extraction of http formas by [nixxo](https://github.com/nixxo) * [rumble] unescape title * [RUTV] Fix format sorting by [Lesmiscore](https://github.com/Lesmiscore) * [ruutu] Detect embeds by [tpikonen](https://github.com/tpikonen) * [tenplay] Improve extractor by [aarubui](https://github.com/aarubui) * [TikTok] Fix URLs with user id by [hatienl0i261299](https://github.com/hatienl0i261299) * [TikTokVM] Fix redirect to user URL * [TVer] Fix extractor by [Lesmiscore](https://github.com/Lesmiscore) * [TVer] Support landing page by [vvto33](https://github.com/vvto33) * [twitcasting] Don't return multi_video for archive with single hls manifest by [Lesmiscore](https://github.com/Lesmiscore) * [veo] Fix `_VALID_URL` * [Veo] Fix extractor by [i6t](https://github.com/i6t) * [viki] Don't attempt to modify URLs with signature by [nyuszika7h](https://github.com/nyuszika7h) * [viu] Fix bypass for preview by [zackmark29](https://github.com/zackmark29) * [viu] Fixed extractor by [zackmark29](https://github.com/zackmark29), [pukkandan](https://github.com/pukkandan) * [web.archive:youtube] Make CDX API requests non-fatal by [coletdjnz](https://github.com/coletdjnz) * [wget] Fix proxy by [kikuyan](https://github.com/kikuyan), [coletdjnz](https://github.com/coletdjnz) * [xnxx] Add `xnxx3.com` by [rozari0](https://github.com/rozari0) * [youtube] **Add new age-gate bypass** by [zerodytrash](https://github.com/zerodytrash), [pukkandan](https://github.com/pukkandan) * [youtube] Add extractor-arg to skip auto-translated subs * [youtube] Avoid false positives when detecting damaged formats * [youtube] Detect DRM better by [shirt](https://github.com/shirt-dev) * [youtube] Fix auto-translated automatic captions * [youtube] Fix pagination of `membership` tab * [youtube] Fix uploader for collaborative playlists by [coletdjnz](https://github.com/coletdjnz) * [youtube] Improve video upload date handling by [coletdjnz](https://github.com/coletdjnz) * [youtube:api] Prefer minified JSON response by [coletdjnz](https://github.com/coletdjnz) * [youtube:search] Support hashtag entries by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Fix duration extraction for shorts by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Minor improvements * [youtube:tab] Return shorts url if video is a short by [coletdjnz](https://github.com/coletdjnz) * [Zattoo] Fix extractors by [goggle](https://github.com/goggle) * [Zingmp3] Fix signature by [hatienl0i261299](https://github.com/hatienl0i261299) ### 2022.03.08.1 * [cleanup] Refactor `__init__.py` * [build] Fix bug ### 2022.03.08 * Merge youtube-dl: Upto [commit/6508688](https://github.com/ytdl-org/youtube-dl/commit/6508688e88c83bb811653083db9351702cd39a6a) (except NDR) * Add regex operator and quoting to format filters by [lukasfink1](https://github.com/lukasfink1) * Add brotli content-encoding support by [coletdjnz](https://github.com/coletdjnz) * Add pre-processor stage `after_filter` * Better error message when no `--live-from-start` format * Create necessary directories for `--print-to-file` * Fill more fields for playlists by [Lesmiscore](https://github.com/Lesmiscore) * Fix `-all` for `--sub-langs` * Fix doubling of `video_id` in `ExtractorError` * Fix for when stdout/stderr encoding is `None` * Handle negative duration from extractor * Implement `--add-header` without modifying `std_headers` * Obey `--abort-on-error` for "ffmpeg not installed" * Set `webpage_url_...` from `webpage_url` and not input URL * Tolerate failure to `--write-link` due to unknown URL * [aria2c] Add `--http-accept-gzip=true` * [build] Update pyinstaller to 4.10 by [shirt](https://github.com/shirt-dev) * [cookies] Update MacOS12 `Cookies.binarycookies` location by [mdpauley](https://github.com/mdpauley) * [devscripts] Improve `prepare_manpage` * [downloader] Do not use aria2c for non-native `m3u8` * [downloader] Obey `--file-access-retries` when deleting/renaming by [ehoogeveen-medweb](https://github.com/ehoogeveen-medweb) * [extractor] Allow `http_headers` to be specified for `thumbnails` * [extractor] Extract subtitles from manifests for vimeo, globo, kaltura, svt by [fstirlitz](https://github.com/fstirlitz) * [extractor] Fix for manifests without period duration by [dirkf](https://github.com/dirkf), [pukkandan](https://github.com/pukkandan) * [extractor] Support `--mark-watched` without `_NETRC_MACHINE` by [coletdjnz](https://github.com/coletdjnz) * [FFmpegConcat] Abort on `--simulate` * [FormatSort] Consider `acodec`=`ogg` as `vorbis` * [fragment] Fix bugs around resuming with Range by [Lesmiscore](https://github.com/Lesmiscore) * [fragment] Improve `--live-from-start` for YouTube livestreams by [Lesmiscore](https://github.com/Lesmiscore) * [generic] Pass referer to extracted formats * [generic] Set rss `guid` as video id by [Bricio](https://github.com/Bricio) * [options] Better ambiguous option resolution * [options] Rename `--clean-infojson` to `--clean-info-json` * [SponsorBlock] Fixes for highlight and "full video labels" by [nihil-admirari](https://github.com/nihil-admirari) * [Sponsorblock] minor fixes by [nihil-admirari](https://github.com/nihil-admirari) * [utils] Better traceback for `ExtractorError` * [utils] Fix file locking for AOSP by [jakeogh](https://github.com/jakeogh) * [utils] Improve file locking * [utils] OnDemandPagedList: Do not download pages after error * [utils] render_table: Fix character calculation for removing extra gap by [Lesmiscore](https://github.com/Lesmiscore) * [utils] Use `locked_file` for `sanitize_open` by [jakeogh](https://github.com/jakeogh) * [utils] Validate `DateRange` input * [utils] WebSockets wrapper for non-async functions by [Lesmiscore](https://github.com/Lesmiscore) * [cleanup] Don't pass protocol to `_extract_m3u8_formats` for live videos * [cleanup] Remove extractors for some dead websites by [marieell](https://github.com/marieell) * [cleanup, docs] Misc cleanup * [AbemaTV] Add extractors by [Lesmiscore](https://github.com/Lesmiscore) * [adobepass] Add Suddenlink MSO by [CplPwnies](https://github.com/CplPwnies) * [ant1newsgr] Add extractor by [zmousm](https://github.com/zmousm) * [bigo] Add extractor by [Lesmiscore](https://github.com/Lesmiscore) * [Caltrans] Add extractor by [Bricio](https://github.com/Bricio) * [daystar] Add extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [fc2:live] Add extractor by [Lesmiscore](https://github.com/Lesmiscore) * [fptplay] Add extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [murrtube] Add extractor by [cyberfox1691](https://github.com/cyberfox1691) * [nfb] Add extractor by [ofkz](https://github.com/ofkz) * [niconico] Add playlist extractors and refactor by [Lesmiscore](https://github.com/Lesmiscore) * [peekvids] Add extractor by [schn0sch](https://github.com/schn0sch) * [piapro] Add extractor by [pycabbage](https://github.com/pycabbage), [Lesmiscore](https://github.com/Lesmiscore) * [rokfin] Add extractor by [P-reducible](https://github.com/P-reducible), [pukkandan](https://github.com/pukkandan) * [rokfin] Add stack and channel extractors by [P-reducible](https://github.com/P-reducible), [pukkandan](https://github.com/pukkandan) * [ruv.is] Add extractor by [iw0nderhow](https://github.com/iw0nderhow) * [telegram] Add extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [VideocampusSachsen] Add extractors by [FestplattenSchnitzel](https://github.com/FestplattenSchnitzel) * [xinpianchang] Add extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [abc] Support 1080p by [Ronnnny](https://github.com/Ronnnny) * [afreecatv] Support password-protected livestreams by [wlritchi](https://github.com/wlritchi) * [ard] Fix valid URL * [ATVAt] Detect geo-restriction by [marieell](https://github.com/marieell) * [bandcamp] Detect acodec * [bandcamp] Fix user URLs by [lyz-code](https://github.com/lyz-code) * [bbc] Fix extraction of news articles by [ajj8](https://github.com/ajj8) * [beeg] Fix extractor by [Bricio](https://github.com/Bricio) * [bigo] Fix extractor to not to use `form_params` * [Bilibili] Pass referer for all formats by [blackgear](https://github.com/blackgear) * [Biqle] Fix extractor by [Bricio](https://github.com/Bricio) * [ccma] Fix timestamp parsing by [nyuszika7h](https://github.com/nyuszika7h) * [crunchyroll] Better error reporting on login failure by [tejing1](https://github.com/tejing1) * [cspan] Support of C-Span congress videos by [Grabien](https://github.com/Grabien) * [dropbox] fix regex by [zenerdi0de](https://github.com/zenerdi0de) * [fc2] Fix extraction by [Lesmiscore](https://github.com/Lesmiscore) * [fujitv] Extract resolution for free sources by [YuenSzeHong](https://github.com/YuenSzeHong) * [Gettr] Add `GettrStreamingIE` by [i6t](https://github.com/i6t) * [Gettr] Fix formats order by [i6t](https://github.com/i6t) * [Gettr] Improve extractor by [i6t](https://github.com/i6t) * [globo] Expand valid URL by [Bricio](https://github.com/Bricio) * [lbry] Fix `--ignore-no-formats-error` * [manyvids] Extract `uploader` by [regarten](https://github.com/regarten) * [mildom] Fix linter * [mildom] Rework extractors by [Lesmiscore](https://github.com/Lesmiscore) * [mirrativ] Cleanup extractor code by [Lesmiscore](https://github.com/Lesmiscore) * [nhk] Add support for NHK for School by [Lesmiscore](https://github.com/Lesmiscore) * [niconico:tag] Add support for searching tags * [nrk] Add fallback API * [peekvids] Use JSON-LD by [schn0sch](https://github.com/schn0sch) * [peertube] Add media.fsfe.org by [mxmehl](https://github.com/mxmehl) * [rtvs] Fix extractor by [Bricio](https://github.com/Bricio) * [spiegel] Fix `_VALID_URL` * [ThumbnailsConvertor] Support `webp` * [tiktok] Fix `vm.tiktok`/`vt.tiktok` URLs * [tubitv] Fix/improve TV series extraction by [bbepis](https://github.com/bbepis) * [tumblr] Fix extractor by [foghawk](https://github.com/foghawk) * [twitcasting] Add fallback for finding running live by [Lesmiscore](https://github.com/Lesmiscore) * [TwitCasting] Check for password protection by [Lesmiscore](https://github.com/Lesmiscore) * [twitcasting] Fix extraction by [Lesmiscore](https://github.com/Lesmiscore) * [twitch] Fix field name of `view_count` * [twitter] Fix for private videos by [iphoting](https://github.com/iphoting) * [washingtonpost] Fix extractor by [Bricio](https://github.com/Bricio) * [youtube:tab] Add `approximate_date` extractor-arg * [youtube:tab] Follow redirect to regional channel by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Reject webpage data if redirected to home page * [youtube] De-prioritize potentially damaged formats * [youtube] Differentiate descriptive audio by language code * [youtube] Ensure subtitle urls are absolute by [coletdjnz](https://github.com/coletdjnz) * [youtube] Escape possible `$` in `_extract_n_function_name` regex by [Lesmiscore](https://github.com/Lesmiscore) * [youtube] Fix automatic captions * [youtube] Fix n-sig extraction for phone player JS by [MinePlayersPE](https://github.com/MinePlayersPE) * [youtube] Further de-prioritize 3gp format * [youtube] Label original auto-subs * [youtube] Prefer UTC upload date for videos by [coletdjnz](https://github.com/coletdjnz) * [zaq1] Remove dead extractor by [marieell](https://github.com/marieell) * [zee5] Support web-series by [Aniruddh-J](https://github.com/Aniruddh-J) * [zingmp3] Fix extractor by [hatienl0i261299](https://github.com/hatienl0i261299) * [zoom] Add support for screen cast by [Mipsters](https://github.com/Mipsters) ### 2022.02.04 * [youtube:search] Fix extractor by [coletdjnz](https://github.com/coletdjnz) * [youtube:search] Add tests * [twitcasting] Enforce UTF-8 for POST payload by [Lesmiscore](https://github.com/Lesmiscore) * [mediaset] Fix extractor by [nixxo](https://github.com/nixxo) * [websocket] Make syntax error in `websockets` module non-fatal ### 2022.02.03 * Merge youtube-dl: Upto [commit/78ce962](https://github.com/ytdl-org/youtube-dl/commit/78ce962f4fe020994c216dd2671546fbe58a5c67) * Add option `--print-to-file` * Make nested --config-locations relative to parent file * Ensure `_type` is present in `info.json` * Fix `--compat-options list-formats` * Fix/improve `InAdvancePagedList` * [downloader/ffmpeg] Handle unknown formats better * [outtmpl] Handle `-o ""` better * [outtmpl] Handle hard-coded file extension better * [extractor] Add convinience function `_yes_playlist` * [extractor] Allow non-fatal `title` extraction * [extractor] Extract video inside `Article` json_ld * [generic] Allow further processing of json_ld URL * [cookies] Fix keyring selection for unsupported desktops * [utils] Strip double spaces in `clean_html` by [dirkf](https://github.com/dirkf) * [aes] Add `unpad_pkcs7` * [test] Fix `test_youtube_playlist_noplaylist` * [docs,cleanup] Misc cleanup * [dplay] Add extractors for site changes by [Sipherdrakon](https://github.com/Sipherdrakon) * [ertgr] Add extractors by [zmousm](https://github.com/zmousm), [dirkf](https://github.com/dirkf) * [Musicdex] Add extractors by [Ashish0804](https://github.com/Ashish0804) * [YandexVideoPreview] Add extractor by [KiberInfinity](https://github.com/KiberInfinity) * [youtube] Add extractor `YoutubeMusicSearchURLIE` * [archive.org] Ignore unnecessary files * [Bilibili] Add 8k support by [u-spec-png](https://github.com/u-spec-png) * [bilibili] Fix extractor, make anthology title non-fatal * [CAM4] Add thumbnail extraction by [alerikaisattera](https://github.com/alerikaisattera) * [cctv] De-prioritize sample format * [crunchyroll:beta] Add cookies support by [tejing1](https://github.com/tejing1) * [crunchyroll] Fix login by [tejing1](https://github.com/tejing1) * [doodstream] Fix extractor * [fc2] Fix extraction by [Lesmiscore](https://github.com/Lesmiscore) * [FFmpegConcat] Abort on --skip-download and download errors * [Fujitv] Extract metadata and support premium by [YuenSzeHong](https://github.com/YuenSzeHong) * [globo] Fix extractor by [Bricio](https://github.com/Bricio) * [glomex] Simplify embed detection * [GoogleSearch] Fix extractor * [Instagram] Fix extraction when logged in by [MinePlayersPE](https://github.com/MinePlayersPE) * [iq.com] Add VIP support by [MinePlayersPE](https://github.com/MinePlayersPE) * [mildom] Fix extractor by [lazypete365](https://github.com/lazypete365) * [MySpass] Fix video url processing by [trassshhub](https://github.com/trassshhub) * [Odnoklassniki] Improve embedded players extraction by [KiberInfinity](https://github.com/KiberInfinity) * [orf:tvthek] Lazy playlist extraction and obey --no-playlist * [Pladform] Fix redirection to external player by [KiberInfinity](https://github.com/KiberInfinity) * [ThisOldHouse] Improve Premium URL check by [Ashish0804](https://github.com/Ashish0804) * [TikTok] Iterate through app versions by [MinePlayersPE](https://github.com/MinePlayersPE) * [tumblr] Fix 403 errors and handle vimeo embeds by [foghawk](https://github.com/foghawk) * [viki] Fix "Bad request" for manifest by [nyuszika7h](https://github.com/nyuszika7h) * [Vimm] add recording extractor by [alerikaisattera](https://github.com/alerikaisattera) * [web.archive:youtube] Add `ytarchive:` prefix and misc cleanup * [youtube:api] Do not use seek when reading HTTPError response by [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix n-sig for player e06dea74 * [youtube, cleanup] Misc fixes and cleanup ### 2022.01.21 * Add option `--concat-playlist` to **concat videos in a playlist** * Allow **multiple and nested configuration files** * Add more post-processing stages (`after_video`, `playlist`) * Allow `--exec` to be run at any post-processing stage (Deprecates `--exec-before-download`) * Allow `--print` to be run at any post-processing stage * Allow listing formats, thumbnails, subtitles using `--print` by [pukkandan](https://github.com/pukkandan), [Zirro](https://github.com/Zirro) * Add fields `video_autonumber`, `modified_date`, `modified_timestamp`, `playlist_count`, `channel_follower_count` * Add key `requested_downloads` in the root `info_dict` * Write `download_archive` only after all formats are downloaded * [FfmpegMetadata] Allow setting metadata of individual streams using `meta<n>_` prefix * Add option `--legacy-server-connect` by [xtkoba](https://github.com/xtkoba) * Allow escaped `,` in `--extractor-args` * Allow unicode characters in `info.json` * Check for existing thumbnail/subtitle in final directory * Don't treat empty containers as `None` in `sanitize_info` * Fix `-s --ignore-no-formats --force-write-archive` * Fix live title for multiple formats * List playlist thumbnails in `--list-thumbnails` * Raise error if subtitle download fails * [cookies] Fix bug when keyring is unspecified * [ffmpeg] Ignore unknown streams, standardize use of `-map 0` * [outtmpl] Alternate form for `D` and fix suffix's case * [utils] Add `Sec-Fetch-Mode` to `std_headers` * [utils] Fix `format_bytes` output for Bytes by [pukkandan](https://github.com/pukkandan), [mdawar](https://github.com/mdawar) * [utils] Handle `ss:xxx` in `parse_duration` * [utils] Improve parsing for nested HTML elements by [zmousm](https://github.com/zmousm), [pukkandan](https://github.com/pukkandan) * [utils] Use key `None` in `traverse_obj` to return as-is * [extractor] Detect more subtitle codecs in MPD manifests by [fstirlitz](https://github.com/fstirlitz) * [extractor] Extract chapters from JSON-LD by [iw0nderhow](https://github.com/iw0nderhow), [pukkandan](https://github.com/pukkandan) * [extractor] Extract thumbnails from JSON-LD by [nixxo](https://github.com/nixxo) * [extractor] Improve `url_result` and related * [generic] Improve KVS player extraction by [trassshhub](https://github.com/trassshhub) * [build] Reduce dependency on third party workflows * [extractor,cleanup] Use `_search_nextjs_data`, `format_field` * [cleanup] Minor fixes and cleanup * [docs] Improvements * [test] Fix TestVerboseOutput * [afreecatv] Add livestreams extractor by [wlritchi](https://github.com/wlritchi) * [callin] Add extractor by [foghawk](https://github.com/foghawk) * [CrowdBunker] Add extractors by [Ashish0804](https://github.com/Ashish0804) * [daftsex] Add extractors by [k3ns1n](https://github.com/k3ns1n) * [digitalconcerthall] Add extractor by [teridon](https://github.com/teridon) * [Drooble] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [EuropeanTour] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [iq.com] Add extractors by [MinePlayersPE](https://github.com/MinePlayersPE) * [KelbyOne] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [LnkIE] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [MainStreaming] Add extractor by [coletdjnz](https://github.com/coletdjnz) * [megatvcom] Add extractors by [zmousm](https://github.com/zmousm) * [Newsy] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [noodlemagazine] Add extractor by [trassshhub](https://github.com/trassshhub) * [PokerGo] Add extractors by [Ashish0804](https://github.com/Ashish0804) * [Pornez] Add extractor by [mozlima](https://github.com/mozlima) * [PRX] Add Extractors by [coletdjnz](https://github.com/coletdjnz) * [RTNews] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [Rule34video] Add extractor by [trassshhub](https://github.com/trassshhub) * [tvopengr] Add extractors by [zmousm](https://github.com/zmousm) * [Vimm] Add extractor by [alerikaisattera](https://github.com/alerikaisattera) * [glomex] Add extractors by [zmousm](https://github.com/zmousm) * [instagram] Add story/highlight extractor by [u-spec-png](https://github.com/u-spec-png) * [openrec] Add movie extractor by [Lesmiscore](https://github.com/Lesmiscore) * [rai] Add Raiplaysound extractors by [nixxo](https://github.com/nixxo), [pukkandan](https://github.com/pukkandan) * [aparat] Fix extractor * [ard] Extract subtitles by [fstirlitz](https://github.com/fstirlitz) * [BiliIntl] Add login by [MinePlayersPE](https://github.com/MinePlayersPE) * [CeskaTelevize] Use `http` for manifests * [CTVNewsIE] Add fallback for video search by [Ashish0804](https://github.com/Ashish0804) * [dplay] Migrate DiscoveryPlusItaly to DiscoveryPlus by [timendum](https://github.com/timendum) * [dplay] Re-structure DiscoveryPlus extractors * [Dropbox] Support password protected files and more formats by [zenerdi0de](https://github.com/zenerdi0de) * [facebook] Fix extraction from groups * [facebook] Improve title and uploader extraction * [facebook] Parse dash manifests * [fox] Extract m3u8 from preview by [ischmidt20](https://github.com/ischmidt20) * [funk] Support origin URLs * [gfycat] Fix `uploader` * [gfycat] Support embeds by [coletdjnz](https://github.com/coletdjnz) * [hotstar] Add extractor args to ignore tags by [Ashish0804](https://github.com/Ashish0804) * [hrfernsehen] Fix ardloader extraction by [CreaValix](https://github.com/CreaValix) * [instagram] Fix username extraction for stories and highlights by [nyuszika7h](https://github.com/nyuszika7h) * [kakao] Detect geo-restriction * [line] Remove `tv.line.me` by [sian1468](https://github.com/sian1468) * [mixch] Add `MixchArchiveIE` by [Lesmiscore](https://github.com/Lesmiscore) * [mixcloud] Detect restrictions by [llacb47](https://github.com/llacb47) * [NBCSports] Fix extraction of platform URLs by [ischmidt20](https://github.com/ischmidt20) * [Nexx] Extract more metadata by [MinePlayersPE](https://github.com/MinePlayersPE) * [Nexx] Support 3q CDN by [MinePlayersPE](https://github.com/MinePlayersPE) * [pbs] de-prioritize AD formats * [PornHub,YouTube] Refresh onion addresses by [unit193](https://github.com/unit193) * [RedBullTV] Parse subtitles from manifest by [Ashish0804](https://github.com/Ashish0804) * [streamcz] Fix extractor by [arkamar](https://github.com/arkamar), [pukkandan](https://github.com/pukkandan) * [Ted] Rewrite extractor by [pukkandan](https://github.com/pukkandan), [trassshhub](https://github.com/trassshhub) * [Theta] Fix valid URL by [alerikaisattera](https://github.com/alerikaisattera) * [ThisOldHouseIE] Add support for premium videos by [Ashish0804](https://github.com/Ashish0804) * [TikTok] Fix extraction for sigi-based webpages, add API fallback by [MinePlayersPE](https://github.com/MinePlayersPE) * [TikTok] Pass cookies to formats, and misc fixes by [MinePlayersPE](https://github.com/MinePlayersPE) * [TikTok] Extract captions, user thumbnail by [MinePlayersPE](https://github.com/MinePlayersPE) * [TikTok] Change app version by [MinePlayersPE](https://github.com/MinePlayersPE), [llacb47](https://github.com/llacb47) * [TVer] Extract message for unaired live by [Lesmiscore](https://github.com/Lesmiscore) * [twitcasting] Refactor extractor by [Lesmiscore](https://github.com/Lesmiscore) * [twitter] Fix video in quoted tweets * [veoh] Improve extractor by [foghawk](https://github.com/foghawk) * [vk] Capture `clip` URLs * [vk] Fix VKUserVideosIE by [Ashish0804](https://github.com/Ashish0804) * [vk] Improve `_VALID_URL` by [k3ns1n](https://github.com/k3ns1n) * [VrtNU] Handle empty title by [pgaig](https://github.com/pgaig) * [XVideos] Check HLS formats by [MinePlayersPE](https://github.com/MinePlayersPE) * [yahoo:gyao] Improved playlist handling by [hyano](https://github.com/hyano) * [youtube:tab] Extract more playlist metadata by [coletdjnz](https://github.com/coletdjnz), [pukkandan](https://github.com/pukkandan) * [youtube:tab] Raise error on tab redirect by [krichbanana](https://github.com/krichbanana), [coletdjnz](https://github.com/coletdjnz) * [youtube] Update Innertube clients by [coletdjnz](https://github.com/coletdjnz) * [youtube] Detect live-stream embeds * [youtube] Do not return `upload_date` for playlists * [youtube] Extract channel subscriber count by [coletdjnz](https://github.com/coletdjnz) * [youtube] Make invalid storyboard URL non-fatal * [youtube] Enforce UTC, update innertube clients and tests by [coletdjnz](https://github.com/coletdjnz) * [zdf] Add chapter extraction by [iw0nderhow](https://github.com/iw0nderhow) * [zee5] Add geo-bypass ### 2021.12.27 * Avoid recursion error when re-extracting info * [ffmpeg] Fix position of `--ppa` * [aria2c] Don't show progress when `--no-progress` * [cookies] Support other keyrings by [mbway](https://github.com/mbway) * [EmbedThumbnail] Prefer AtomicParsley over ffmpeg if available * [generic] Fix HTTP KVS Player by [git-anony-mouse](https://github.com/git-anony-mouse) * [ThumbnailsConvertor] Fix for when there are no thumbnails * [docs] Add examples for using `TYPES:` in `-P`/`-o` * [PixivSketch] Add extractors by [nao20010128nao](https://github.com/nao20010128nao) * [tiktok] Add music, sticker and tag IEs by [MinePlayersPE](https://github.com/MinePlayersPE) * [BiliIntl] Fix extractor by [MinePlayersPE](https://github.com/MinePlayersPE) * [CBC] Fix URL regex * [tiktok] Fix `extractor_key` used in archive * [youtube] **End `live-from-start` properly when stream ends with 403** * [Zee5] Fix VALID_URL for tv-shows by [Ashish0804](https://github.com/Ashish0804) ### 2021.12.25 * [dash,youtube] **Download live from start to end** by [nao20010128nao](https://github.com/nao20010128nao), [pukkandan](https://github.com/pukkandan) * Add option `--live-from-start` to enable downloading live videos from start * Add key `is_from_start` in formats to identify formats (of live videos) that downloads from start * [dash] Create protocol `http_dash_segments_generator` that allows a function to be passed instead of fragments * [fragment] Allow multiple live dash formats to download simultaneously * [youtube] Implement fragment re-fetching for the live dash formats * [youtube] Re-extract dash manifest every 5 hours (manifest expires in 6hrs) * [postprocessor/ffmpeg] Add `FFmpegFixupDuplicateMoovPP` to fixup duplicated moov atoms * Known issues: * Ctrl+C doesn't work on Windows when downloading multiple formats * If video becomes private, download hangs * [SponsorBlock] Add `Filler` and `Highlight` categories by [nihil-admirari](https://github.com/nihil-admirari), [pukkandan](https://github.com/pukkandan) * Change `--sponsorblock-cut all` to `--sponsorblock-cut default` if you do not want filler sections to be removed * Add field `webpage_url_domain` * Add interactive format selection with `-f -` * Add option `--file-access-retries` by [ehoogeveen-medweb](https://github.com/ehoogeveen-medweb) * [outtmpl] Add alternate forms `S`, `D` and improve `id` detection * [outtmpl] Add operator `&` for replacement text by [PilzAdam](https://github.com/PilzAdam) * [EmbedSubtitle] Disable duration check temporarily * [extractor] Add `_search_nuxt_data` by [nao20010128nao](https://github.com/nao20010128nao) * [extractor] Ignore errors in comment extraction when `-i` is given * [extractor] Standardize `_live_title` * [FormatSort] Prevent incorrect deprecation warning * [generic] Extract m3u8 formats from JSON-LD * [postprocessor/ffmpeg] Always add `faststart` * [utils] Fix parsing `YYYYMMDD` dates in Nov/Dec by [wlritchi](https://github.com/wlritchi) * [utils] Improve `parse_count` * [utils] Update `std_headers` by [kikuyan](https://github.com/kikuyan), [fstirlitz](https://github.com/fstirlitz) * [lazy_extractors] Fix for search IEs * [extractor] Support default implicit graph in JSON-LD by [zmousm](https://github.com/zmousm) * Allow `--no-write-thumbnail` to override `--write-all-thumbnail` * Fix `--throttled-rate` * Fix control characters being printed to `--console-title` * Fix PostProcessor hooks not registered for some PPs * Pre-process when using `--flat-playlist` * Remove known invalid thumbnails from `info_dict` * Add warning when using `-f best` * Use `parse_duration` for `--wait-for-video` and some minor fix * [test/download] Add more fields * [test/download] Ignore field `webpage_url_domain` by [std-move](https://github.com/std-move) * [compat] Suppress errors in enabling VT mode * [docs] Improve manpage format by [iw0nderhow](https://github.com/iw0nderhow), [pukkandan](https://github.com/pukkandan) * [docs,cleanup] Minor fixes and cleanup * [cleanup] Fix some typos by [unit193](https://github.com/unit193) * [ABC:iview] Add show extractor by [pabs3](https://github.com/pabs3) * [dropout] Add extractor by [TwoThousandHedgehogs](https://github.com/TwoThousandHedgehogs), [pukkandan](https://github.com/pukkandan) * [GameJolt] Add extractors by [MinePlayersPE](https://github.com/MinePlayersPE) * [gofile] Add extractor by [Jertzukka](https://github.com/Jertzukka), [Ashish0804](https://github.com/Ashish0804) * [hse] Add extractors by [cypheron](https://github.com/cypheron), [pukkandan](https://github.com/pukkandan) * [NateTV] Add NateIE and NateProgramIE by [Ashish0804](https://github.com/Ashish0804), [Hyeeji](https://github.com/Hyeeji) * [OpenCast] Add extractors by [bwildenhain](https://github.com/bwildenhain), [C0D3D3V](https://github.com/C0D3D3V) * [rtve] Add `RTVEAudioIE` by [kebianizao](https://github.com/kebianizao) * [Rutube] Add RutubeChannelIE by [Ashish0804](https://github.com/Ashish0804) * [skeb] Add extractor by [nao20010128nao](https://github.com/nao20010128nao) * [soundcloud] Add related tracks extractor by [Lapin0t](https://github.com/Lapin0t) * [toggo] Add extractor by [nyuszika7h](https://github.com/nyuszika7h) * [TrueID] Add extractor by [MinePlayersPE](https://github.com/MinePlayersPE) * [audiomack] Update album and song VALID_URL by [abdullah-if](https://github.com/abdullah-if), [dirkf](https://github.com/dirkf) * [CBC Gem] Extract 1080p formats by [DavidSkrundz](https://github.com/DavidSkrundz) * [ceskatelevize] Fetch iframe from nextJS data by [mkubecek](https://github.com/mkubecek) * [crackle] Look for non-DRM formats by [raleeper](https://github.com/raleeper) * [dplay] Temporary fix for `discoveryplus.com/it` * [DiscoveryPlusShowBaseIE] yield actual video id by [Ashish0804](https://github.com/Ashish0804) * [Facebook] Handle redirect URLs * [fujitv] Extract 1080p from `tv_android` m3u8 by [YuenSzeHong](https://github.com/YuenSzeHong) * [gronkh] Support new URL pattern by [Sematre](https://github.com/Sematre) * [instagram] Expand valid URL by [u-spec-png](https://github.com/u-spec-png) * [Instagram] Try bypassing login wall with embed page by [MinePlayersPE](https://github.com/MinePlayersPE) * [Jamendo] Fix use of `_VALID_URL_RE` by [jaller94](https://github.com/jaller94) * [LBRY] Support livestreams by [Ashish0804](https://github.com/Ashish0804), [pukkandan](https://github.com/pukkandan) * [NJPWWorld] Extract formats from m3u8 by [aarubui](https://github.com/aarubui) * [NovaEmbed] update player regex by [std-move](https://github.com/std-move) * [npr] Make SMIL extraction non-fatal by [r5d](https://github.com/r5d) * [ntvcojp] Extract NUXT data by [nao20010128nao](https://github.com/nao20010128nao) * [ok.ru] add mobile fallback by [nao20010128nao](https://github.com/nao20010128nao) * [olympics] Add uploader and cleanup by [u-spec-png](https://github.com/u-spec-png) * [ondemandkorea] Update `jw_config` regex by [julien-hadleyjack](https://github.com/julien-hadleyjack) * [PlutoTV] Expand `_VALID_URL` * [RaiNews] Fix extractor by [nixxo](https://github.com/nixxo) * [RCTIPlusSeries] Lazy extraction and video type selection by [MinePlayersPE](https://github.com/MinePlayersPE) * [redtube] Handle formats delivered inside a JSON by [dirkf](https://github.com/dirkf), [nixxo](https://github.com/nixxo) * [SonyLiv] Add OTP login support by [Ashish0804](https://github.com/Ashish0804) * [Steam] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [TikTok] Pass cookies to mobile API by [MinePlayersPE](https://github.com/MinePlayersPE) * [trovo] Fix inheritance of `TrovoChannelBaseIE` * [TVer] Extract better thumbnails by [YuenSzeHong](https://github.com/YuenSzeHong) * [vimeo] Extract chapters * [web.archive:youtube] Improve metadata extraction by [coletdjnz](https://github.com/coletdjnz) * [youtube:comments] Add more options for limiting number of comments extracted by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Extract more metadata from feeds/channels/playlists by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Extract video thumbnails from playlist by [coletdjnz](https://github.com/coletdjnz), [pukkandan](https://github.com/pukkandan) * [youtube:tab] Ignore query when redirecting channel to playlist and cleanup of related code * [youtube] Fix `ytsearchdate` * [zdf] Support videos with different ptmd location by [iw0nderhow](https://github.com/iw0nderhow) * [zee5] Support /episodes in URL ### 2021.12.01 * **Add option `--wait-for-video` to wait for scheduled streams** * Add option `--break-per-input` to apply --break-on... to each input URL * Add option `--embed-info-json` to embed info.json in mkv * Add compat-option `embed-metadata` * Allow using a custom format selector through API * [AES] Add ECB mode by [nao20010128nao](https://github.com/nao20010128nao) * [build] Fix MacOS Build * [build] Save Git HEAD at release alongside version info * [build] Use `workflow_dispatch` for release * [downloader/ffmpeg] Fix for direct videos inside mpd manifests * [downloader] Add colors to download progress * [EmbedSubtitles] Slightly relax duration check and related cleanup * [ExtractAudio] Fix conversion to `wav` and `vorbis` * [ExtractAudio] Support `alac` * [extractor] Extract `average_rating` from JSON-LD * [FixupM3u8] Fixup MPEG-TS in MP4 container * [generic] Support mpd manifests without extension by [shirt](https://github.com/shirt-dev) * [hls] Better FairPlay DRM detection by [nyuszika7h](https://github.com/nyuszika7h) * [jsinterp] Fix splice to handle float (for youtube js player f1ca6900) * [utils] Allow alignment in `render_table` and add tests * [utils] Fix `PagedList` * [utils] Fix error when copying `LazyList` * Clarify video/audio-only formats in -F * Ensure directory exists when checking formats * Ensure path for link files exists by [Zirro](https://github.com/Zirro) * Ensure same config file is not loaded multiple times * Fix `postprocessor_hooks` * Fix `--break-on-archive` when pre-checking * Fix `--check-formats` for `mhtml` * Fix `--load-info-json` of playlists with failed entries * Fix `--trim-filename` when filename has `.` * Fix bug in parsing `--add-header` * Fix error in `report_unplayable_conflict` by [shirt](https://github.com/shirt-dev) * Fix writing playlist infojson with `--no-clean-infojson` * Validate --get-bypass-country * [blogger] Add extractor by [pabs3](https://github.com/pabs3) * [breitbart] Add extractor by [Grabien](https://github.com/Grabien) * [CableAV] Add extractor by [j54vc1bk](https://github.com/j54vc1bk) * [CanalAlpha] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [CozyTV] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [CPTwentyFour] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [DiscoveryPlus] Add `DiscoveryPlusItalyShowIE` by [Ashish0804](https://github.com/Ashish0804) * [ESPNCricInfo] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [LinkedIn] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [mixch] Add extractor by [nao20010128nao](https://github.com/nao20010128nao) * [nebula] Add `NebulaCollectionIE` and rewrite extractor by [hheimbuerger](https://github.com/hheimbuerger) * [OneFootball] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [peer.tv] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [radiozet] Add extractor by [0xA7404A](https://github.com/0xA7404A) (Aurora) * [redgifs] Add extractor by [chio0hai](https://github.com/chio0hai) * [RedGifs] Add Search and User extractors by [Deer-Spangle](https://github.com/Deer-Spangle) * [rtrfm] Add extractor by [pabs3](https://github.com/pabs3) * [Streamff] Add extractor by [cntrl-s](https://github.com/cntrl-s) * [Stripchat] Add extractor by [zulaport](https://github.com/zulaport) * [Aljazeera] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [AmazonStoreIE] Fix regex to not match vdp urls by [Ashish0804](https://github.com/Ashish0804) * [ARDBetaMediathek] Handle new URLs * [bbc] Get all available formats by [nyuszika7h](https://github.com/nyuszika7h) * [Bilibili] Fix title extraction by [u-spec-png](https://github.com/u-spec-png) * [CBC Gem] Fix for shows that don't have all seasons by [makeworld-the-better-one](https://github.com/makeworld-the-better-one) * [curiositystream] Add more metadata * [CuriosityStream] Fix series * [DiscoveryPlus] Rewrite extractors by [Ashish0804](https://github.com/Ashish0804), [pukkandan](https://github.com/pukkandan) * [HotStar] Set language field from tags by [Ashish0804](https://github.com/Ashish0804) * [instagram, cleanup] Refactor extractors * [Instagram] Display more login errors by [MinePlayersPE](https://github.com/MinePlayersPE) * [itv] Fix extractor by [staubichsauger](https://github.com/staubichsauger), [pukkandan](https://github.com/pukkandan) * [mediaklikk] Expand valid URL * [MTV] Improve mgid extraction by [Sipherdrakon](https://github.com/Sipherdrakon), [kikuyan](https://github.com/kikuyan) * [nexx] Better error message for unsupported format * [NovaEmbed] Fix extractor by [pukkandan](https://github.com/pukkandan), [std-move](https://github.com/std-move) * [PatreonUser] Do not capture RSS URLs * [Reddit] Add support for 1080p videos by [xenova](https://github.com/xenova) * [RoosterTeethSeries] Fix for multiple pages by [MinePlayersPE](https://github.com/MinePlayersPE) * [sbs] Fix for movies and livestreams * [Senate.gov] Add SenateGovIE and fix SenateISVPIE by [Grabien](https://github.com/Grabien), [pukkandan](https://github.com/pukkandan) * [soundcloud:search] Fix pagination * [tiktok:user] Set `webpage_url` correctly * [Tokentube] Fix description by [u-spec-png](https://github.com/u-spec-png) * [trovo] Fix extractor by [nyuszika7h](https://github.com/nyuszika7h) * [tv2] Expand valid URL * [Tvplayhome] Fix extractor by [pukkandan](https://github.com/pukkandan), [18928172992817182](https://github.com/18928172992817182) * [Twitch:vod] Add chapters by [mpeter50](https://github.com/mpeter50) * [twitch:vod] Extract live status by [DEvmIb](https://github.com/DEvmIb) * [VidLii] Add 720p support by [mrpapersonic](https://github.com/mrpapersonic) * [vimeo] Add fallback for config URL * [vimeo] Sort http formats higher * [WDR] Expand valid URL * [willow] Add extractor by [aarubui](https://github.com/aarubui) * [xvideos] Detect embed URLs by [4a1e2y5](https://github.com/4a1e2y5) * [xvideos] Fix extractor by [Yakabuff](https://github.com/Yakabuff) * [youtube, cleanup] Reorganize Tab and Search extractor inheritances * [youtube:search_url] Add playlist/channel support * [youtube] Add `default` player client by [coletdjnz](https://github.com/coletdjnz) * [youtube] Add storyboard formats * [youtube] Decrypt n-sig for URLs with `ratebypass` * [youtube] Minor improvement to format sorting * [cleanup] Add deprecation warnings * [cleanup] Refactor `JSInterpreter._seperate` * [Cleanup] Remove some unnecessary groups in regexes by [Ashish0804](https://github.com/Ashish0804) * [cleanup] Misc cleanup ### 2021.11.10.1 * Temporarily disable MacOS Build ### 2021.11.10 * [youtube] **Fix throttling by decrypting n-sig** * Merging extractors from [haruhi-dl](https://git.sakamoto.pl/laudom/haruhi-dl) by [selfisekai](https://github.com/selfisekai) * [extractor] Add `_search_nextjs_data` * [tvp] Fix extractors * [tvp] Add TVPStreamIE * [wppilot] Add extractors * [polskieradio] Add extractors * [radiokapital] Add extractors * [polsatgo] Add extractor by [selfisekai](https://github.com/selfisekai), [sdomi](https://github.com/sdomi) * Separate `--check-all-formats` from `--check-formats` * Approximate filesize from bitrate * Don't create console in `windows_enable_vt_mode` * Fix bug in `--load-infojson` of playlists * [minicurses] Add colors to `-F` and standardize color-printing code * [outtmpl] Add type `link` for internet shortcut files * [outtmpl] Add alternate forms for `q` and `j` * [outtmpl] Do not traverse `None` * [fragment] Fix progress display in fragmented downloads * [downloader/ffmpeg] Fix vtt download with ffmpeg * [ffmpeg] Detect presence of setts and libavformat version * [ExtractAudio] Rescale `--audio-quality` correctly by [CrypticSignal](https://github.com/CrypticSignal), [pukkandan](https://github.com/pukkandan) * [ExtractAudio] Use `libfdk_aac` if available by [CrypticSignal](https://github.com/CrypticSignal) * [FormatSort] `eac3` is better than `ac3` * [FormatSort] Fix some fields' defaults * [generic] Detect more json_ld * [generic] parse jwplayer with only the json URL * [extractor] Add keyword automatically to SearchIE descriptions * [extractor] Fix some errors being converted to `ExtractorError` * [utils] Add `join_nonempty` * [utils] Add `jwt_decode_hs256` by [Ashish0804](https://github.com/Ashish0804) * [utils] Create `DownloadCancelled` exception * [utils] Parse `vp09` as vp9 * [utils] Sanitize URL when determining protocol * [test/download] Fallback test to `bv` * [docs] Minor documentation improvements * [cleanup] Improvements to error and debug messages * [cleanup] Minor fixes and cleanup * [3speak] Add extractors by [Ashish0804](https://github.com/Ashish0804) * [AmazonStore] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [Gab] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [mediaset] Add playlist support by [nixxo](https://github.com/nixxo) * [MLSScoccer] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [N1] Add support for nova.rs by [u-spec-png](https://github.com/u-spec-png) * [PlanetMarathi] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [RaiplayRadio] Add extractors by [frafra](https://github.com/frafra) * [roosterteeth] Add series extractor * [sky] Add `SkyNewsStoryIE` by [ajj8](https://github.com/ajj8) * [youtube] Fix sorting for some videos * [youtube] Populate `thumbnail` with the best "known" thumbnail * [youtube] Refactor itag processing * [youtube] Remove unnecessary no-playlist warning * [youtube:tab] Add Invidious list for playlists/channels by [rhendric](https://github.com/rhendric) * [Bilibili:comments] Fix infinite loop by [u-spec-png](https://github.com/u-spec-png) * [ceskatelevize] Fix extractor by [flashdagger](https://github.com/flashdagger) * [Coub] Fix media format identification by [wlritchi](https://github.com/wlritchi) * [crunchyroll] Add extractor-args `language` and `hardsub` * [DiscoveryPlus] Allow language codes in URL * [imdb] Fix thumbnail by [ozburo](https://github.com/ozburo) * [instagram] Add IOS URL support by [u-spec-png](https://github.com/u-spec-png) * [instagram] Improve login code by [u-spec-png](https://github.com/u-spec-png) * [Instagram] Improve metadata extraction by [u-spec-png](https://github.com/u-spec-png) * [iPrima] Fix extractor by [stanoarn](https://github.com/stanoarn) * [itv] Add support for ITV News by [ajj8](https://github.com/ajj8) * [la7] Fix extractor by [nixxo](https://github.com/nixxo) * [linkedin] Don't login multiple times * [mtv] Fix some videos by [Sipherdrakon](https://github.com/Sipherdrakon) * [Newgrounds] Fix description by [u-spec-png](https://github.com/u-spec-png) * [Nrk] Minor fixes by [fractalf](https://github.com/fractalf) * [Olympics] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [piksel] Fix sorting * [twitter] Do not sort by codec * [viewlift] Add cookie-based login and series support by [Ashish0804](https://github.com/Ashish0804), [pukkandan](https://github.com/pukkandan) * [vimeo] Detect source extension and misc cleanup by [flashdagger](https://github.com/flashdagger) * [vimeo] Fix ondemand videos and direct URLs with hash * [vk] Fix login and add subtitles by [kaz-us](https://github.com/kaz-us) * [VLive] Add upload_date and thumbnail by [Ashish0804](https://github.com/Ashish0804) * [VRT] Fix login by [pgaig](https://github.com/pgaig) * [Vupload] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [wakanim] Add support for MPD manifests by [nyuszika7h](https://github.com/nyuszika7h) * [wakanim] Detect geo-restriction by [nyuszika7h](https://github.com/nyuszika7h) * [ZenYandex] Fix extractor by [u-spec-png](https://github.com/u-spec-png) ### 2021.10.22 * [build] Improvements * Build standalone MacOS packages by [smplayer-dev](https://github.com/smplayer-dev) * Release windows exe built with `py2exe` * Enable lazy-extractors in releases. * Set env var `YTDLP_NO_LAZY_EXTRACTORS` to forcefully disable this (experimental) * Clean up error reporting in update * Refactor `pyinst.py`, misc cleanup and improve docs * [docs] Migrate issues to use forms by [Ashish0804](https://github.com/Ashish0804) * [downloader] **Fix slow progress hooks** * This was causing HLS/DASH downloads to be extremely slow in some situations * [downloader/ffmpeg] Improve simultaneous download and merge * [EmbedMetadata] Allow overwriting all default metadata with `meta_default` key * [ModifyChapters] Add ability for `--remove-chapters` to remove sections by timestamp * [utils] Allow duration strings in `--match-filter` * Add HDR information to formats * Add negative option `--no-batch-file` by [Zirro](https://github.com/Zirro) * Calculate more fields for merged formats * Do not verify thumbnail URLs unless `--check-formats` is specified * Don't create console for subprocesses on Windows * Fix `--restrict-filename` when used with default template * Fix `check_formats` output being written to stdout when `-qv` * Fix bug in storyboards * Fix conflict b/w id and ext in format selection * Fix verbose head not showing custom configs * Load archive only after printing verbose head * Make `duration_string` and `resolution` available in --match-filter * Re-implement deprecated option `--id` * Reduce default `--socket-timeout` * Write verbose header to logger * [outtmpl] Fix bug in expanding environment variables * [cookies] Local State should be opened as utf-8 * [extractor,utils] Detect more codecs/mimetypes * [extractor] Detect `EXT-X-KEY` Apple FairPlay * [utils] Use `importlib` to load plugins by [sulyi](https://github.com/sulyi) * [http] Retry on socket timeout and show the last encountered error * [fragment] Print error message when skipping fragment * [aria2c] Fix `--skip-unavailable-fragment` * [SponsorBlock] Obey `extractor-retries` and `sleep-requests` * [Merger] Do not add `aac_adtstoasc` to non-hls audio * [ModifyChapters] Do not mutate original chapters by [nihil-admirari](https://github.com/nihil-admirari) * [devscripts/run_tests] Use markers to filter tests by [sulyi](https://github.com/sulyi) * [7plus] Add cookie based authentication by [nyuszika7h](https://github.com/nyuszika7h) * [AdobePass] Fix RCN MSO by [jfogelman](https://github.com/jfogelman) * [CBC] Fix Gem livestream by [makeworld-the-better-one](https://github.com/makeworld-the-better-one) * [CBC] Support CBC Gem member content by [makeworld-the-better-one](https://github.com/makeworld-the-better-one) * [crunchyroll] Add season to flat-playlist * [crunchyroll] Add support for `beta.crunchyroll` URLs and fix series URLs with language code * [EUScreen] Add Extractor by [Ashish0804](https://github.com/Ashish0804) * [Gronkh] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [hidive] Fix typo * [Hotstar] Mention Dynamic Range in `format_id` by [Ashish0804](https://github.com/Ashish0804) * [Hotstar] Raise appropriate error for DRM * [instagram] Add login by [u-spec-png](https://github.com/u-spec-png) * [instagram] Show appropriate error when login is needed * [microsoftstream] Add extractor by [damianoamatruda](https://github.com/damianoamatruda), [nixklai](https://github.com/nixklai) * [on24] Add extractor by [damianoamatruda](https://github.com/damianoamatruda) * [patreon] Fix vimeo player regex by [zenerdi0de](https://github.com/zenerdi0de) * [SkyNewsAU] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [tagesschau] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [tbs] Add tbs live streams by [llacb47](https://github.com/llacb47) * [tiktok] Fix typo and update tests * [trovo] Support channel clips and VODs by [Ashish0804](https://github.com/Ashish0804) * [Viafree] Add support for Finland by [18928172992817182](https://github.com/18928172992817182) * [vimeo] Fix embedded `player.vimeo` * [vlive:channel] Fix extraction by [kikuyan](https://github.com/kikuyan), [pukkandan](https://github.com/pukkandan) * [youtube] Add auto-translated subtitles * [youtube] Expose different formats with same itag * [youtube:comments] Fix for new layout by [coletdjnz](https://github.com/coletdjnz) * [cleanup] Cleanup bilibili code by [pukkandan](https://github.com/pukkandan), [u-spec-png](https://github.com/u-spec-png) * [cleanup] Remove broken youtube login code * [cleanup] Standardize timestamp formatting code * [cleanup] Generalize `getcomments` implementation for extractors * [cleanup] Simplify search extractors code * [cleanup] misc ### 2021.10.10 * [downloader/ffmpeg] Fix bug in initializing `FFmpegPostProcessor` * [minicurses] Fix when printing to file * [downloader] Fix throttledratelimit * [francetv] Fix extractor by [fstirlitz](https://github.com/fstirlitz), [sarnoud](https://github.com/sarnoud) * [NovaPlay] Add extractor by [Bojidarist](https://github.com/Bojidarist) * [ffmpeg] Revert "Set max probesize" - No longer needed * [docs] Remove incorrect dependency on VC++10 * [build] Allow to release without changelog ### 2021.10.09 * Improved progress reporting * Separate `--console-title` and `--no-progress` * Add option `--progress` to show progress-bar even in quiet mode * Fix and refactor `minicurses` and use it for all progress reporting * Standardize use of terminal sequences and enable color support for windows 10 * Add option `--progress-template` to customize progress-bar and console-title * Add postprocessor hooks and progress reporting * [postprocessor] Add plugin support with option `--use-postprocessor` * [extractor] Extract storyboards from SMIL manifests by [fstirlitz](https://github.com/fstirlitz) * [outtmpl] Alternate form of format type `l` for `\n` delimited list * [outtmpl] Format type `U` for unicode normalization * [outtmpl] Allow empty output template to skip a type of file * Merge webm formats into mkv if thumbnails are to be embedded * [adobepass] Add RCN as MSO by [jfogelman](https://github.com/jfogelman) * [ciscowebex] Add extractor by [damianoamatruda](https://github.com/damianoamatruda) * [Gettr] Add extractor by [i6t](https://github.com/i6t) * [GoPro] Add extractor by [i6t](https://github.com/i6t) * [N1] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [Theta] Add video extractor by [alerikaisattera](https://github.com/alerikaisattera) * [Veo] Add extractor by [i6t](https://github.com/i6t) * [Vupload] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [bbc] Extract better quality videos by [ajj8](https://github.com/ajj8) * [Bilibili] Add subtitle converter by [u-spec-png](https://github.com/u-spec-png) * [CBC] Cleanup tests by [makeworld-the-better-one](https://github.com/makeworld-the-better-one) * [Douyin] Rewrite extractor by [MinePlayersPE](https://github.com/MinePlayersPE) * [Funimation] Fix for /v/ urls by [pukkandan](https://github.com/pukkandan), [Jules-A](https://github.com/Jules-A) * [Funimation] Sort formats according to the relevant extractor-args * [Hidive] Fix duplicate and incorrect formats * [HotStarSeries] Fix cookies by [Ashish0804](https://github.com/Ashish0804) * [LinkedInLearning] Add subtitles by [Ashish0804](https://github.com/Ashish0804) * [Mediaite] Relax valid url by [coletdjnz](https://github.com/coletdjnz) * [Newgrounds] Add age_limit and fix duration by [u-spec-png](https://github.com/u-spec-png) * [Newgrounds] Fix view count on songs by [u-spec-png](https://github.com/u-spec-png) * [parliamentlive.tv] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [PolskieRadio] Fix extractors by [jakubadamw](https://github.com/jakubadamw), [u-spec-png](https://github.com/u-spec-png) * [reddit] Add embedded url by [u-spec-png](https://github.com/u-spec-png) * [reddit] Fix 429 by generating a random `reddit_session` by [AjaxGb](https://github.com/AjaxGb) * [Rumble] Add RumbleChannelIE by [Ashish0804](https://github.com/Ashish0804) * [soundcloud:playlist] Detect last page correctly * [SovietsCloset] Add duration from m3u8 by [ChillingPepper](https://github.com/ChillingPepper) * [Streamable] Add codecs by [u-spec-png](https://github.com/u-spec-png) * [vidme] Remove extractor by [alerikaisattera](https://github.com/alerikaisattera) * [youtube:tab] Fallback to API when webpage fails to download by [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix non-fatal errors in fetching player * Fix `--flat-playlist` when neither IE nor id is known * Fix `-f mp4` behaving differently from youtube-dl * Workaround for bug in `ssl.SSLContext.load_default_certs` * [aes] Improve performance slightly by [sulyi](https://github.com/sulyi) * [cookies] Fix keyring fallback by [mbway](https://github.com/mbway) * [embedsubtitle] Fix error when duration is unknown * [ffmpeg] Fix error when subtitle file is missing * [ffmpeg] Set max probesize to workaround AAC HLS stream issues by [shirt](https://github.com/shirt-dev) * [FixupM3u8] Remove redundant run if merged is needed * [hls] Fix decryption issues by [shirt](https://github.com/shirt-dev), [pukkandan](https://github.com/pukkandan) * [http] Respect user-provided chunk size over extractor's * [utils] Let traverse_obj accept functions as keys * [docs] Add note about our custom ffmpeg builds * [docs] Write embedding and contributing documentation by [pukkandan](https://github.com/pukkandan), [timethrow](https://github.com/timethrow) * [update] Check for new version even if not updateable * [build] Add more files to the tarball * [build] Allow building with py2exe (and misc fixes) * [build] Use pycryptodomex by [shirt](https://github.com/shirt-dev), [pukkandan](https://github.com/pukkandan) * [cleanup] Some minor refactoring, improve docs and misc cleanup ### 2021.09.25 * Add new option `--netrc-location` * [outtmpl] Allow alternate fields using `,` * [outtmpl] Add format type `B` to treat the value as bytes (eg: to limit the filename to a certain number of bytes) * Separate the options `--ignore-errors` and `--no-abort-on-error` * Basic framework for simultaneous download of multiple formats by [nao20010128nao](https://github.com/nao20010128nao) * [17live] Add 17.live extractor by [nao20010128nao](https://github.com/nao20010128nao) * [bilibili] Add BiliIntlIE and BiliIntlSeriesIE by [Ashish0804](https://github.com/Ashish0804) * [CAM4] Add extractor by [alerikaisattera](https://github.com/alerikaisattera) * [Chingari] Add extractors by [Ashish0804](https://github.com/Ashish0804) * [CGTN] Add extractor by [chao813](https://github.com/chao813) * [damtomo] Add extractor by [nao20010128nao](https://github.com/nao20010128nao) * [gotostage] Add extractor by [poschi3](https://github.com/poschi3) * [Koo] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [Mediaite] Add Extractor by [Ashish0804](https://github.com/Ashish0804) * [Mediaklikk] Add Extractor by [tmarki](https://github.com/tmarki), [mrx23dot](https://github.com/mrx23dot), [coletdjnz](https://github.com/coletdjnz) * [MuseScore] Add Extractor by [Ashish0804](https://github.com/Ashish0804) * [Newgrounds] Add NewgroundsUserIE and improve extractor by [u-spec-png](https://github.com/u-spec-png) * [nzherald] Add NZHeraldIE by [coletdjnz](https://github.com/coletdjnz) * [Olympics] Add replay extractor by [Ashish0804](https://github.com/Ashish0804) * [Peertube] Add channel and playlist extractors by [u-spec-png](https://github.com/u-spec-png) * [radlive] Add extractor by [nyuszika7h](https://github.com/nyuszika7h) * [SovietsCloset] Add extractor by [ChillingPepper](https://github.com/ChillingPepper) * [Streamanity] Add Extractor by [alerikaisattera](https://github.com/alerikaisattera) * [Theta] Add extractor by [alerikaisattera](https://github.com/alerikaisattera) * [Yandex] Add ZenYandexIE and ZenYandexChannelIE by [Ashish0804](https://github.com/Ashish0804) * [9Now] handle episodes of series by [dalanmiller](https://github.com/dalanmiller) * [AnimalPlanet] Fix extractor by [Sipherdrakon](https://github.com/Sipherdrakon) * [Arte] Improve description extraction by [renalid](https://github.com/renalid) * [atv.at] Use jwt for API by [NeroBurner](https://github.com/NeroBurner) * [brightcove] Extract subtitles from manifests * [CBC] Fix CBC Gem extractors by [makeworld-the-better-one](https://github.com/makeworld-the-better-one) * [cbs] Report appropriate error for DRM * [comedycentral] Support `collection-playlist` by [nixxo](https://github.com/nixxo) * [DIYNetwork] Support new format by [Sipherdrakon](https://github.com/Sipherdrakon) * [downloader/niconico] Pass custom headers by [nao20010128nao](https://github.com/nao20010128nao) * [dw] Fix extractor * [Fancode] Fix live streams by [zenerdi0de](https://github.com/zenerdi0de) * [funimation] Fix for locations outside US by [Jules-A](https://github.com/Jules-A), [pukkandan](https://github.com/pukkandan) * [globo] Fix GloboIE by [Ashish0804](https://github.com/Ashish0804) * [HiDive] Fix extractor by [Ashish0804](https://github.com/Ashish0804) * [Hotstar] Add referer for subs by [Ashish0804](https://github.com/Ashish0804) * [itv] Fix extractor, add subtitles and thumbnails by [coletdjnz](https://github.com/coletdjnz), [sleaux-meaux](https://github.com/sleaux-meaux), [Vangelis66](https://github.com/Vangelis66) * [lbry] Show error message from API response * [Mxplayer] Use mobile API by [Ashish0804](https://github.com/Ashish0804) * [NDR] Rewrite NDRIE by [Ashish0804](https://github.com/Ashish0804) * [Nuvid] Fix extractor by [u-spec-png](https://github.com/u-spec-png) * [Oreilly] Handle new web url by [MKSherbini](https://github.com/MKSherbini) * [pbs] Fix subtitle extraction by [coletdjnz](https://github.com/coletdjnz), [gesa](https://github.com/gesa), [raphaeldore](https://github.com/raphaeldore) * [peertube] Update instances by [u-spec-png](https://github.com/u-spec-png) * [plutotv] Fix extractor for URLs with `/en` * [reddit] Workaround for 429 by redirecting to old.reddit.com * [redtube] Fix exts * [soundcloud] Make playlist extraction lazy * [soundcloud] Retry playlist pages on `502` error and update `_CLIENT_ID` * [southpark] Fix SouthParkDE by [coletdjnz](https://github.com/coletdjnz) * [SovietsCloset] Fix playlists for games with only named categories by [ConquerorDopy](https://github.com/ConquerorDopy) * [SpankBang] Fix uploader by [f4pp3rk1ng](https://github.com/f4pp3rk1ng), [coletdjnz](https://github.com/coletdjnz) * [tiktok] Use API to fetch higher quality video by [MinePlayersPE](https://github.com/MinePlayersPE), [llacb47](https://github.com/llacb47) * [TikTokUser] Fix extractor using mobile API by [MinePlayersPE](https://github.com/MinePlayersPE), [llacb47](https://github.com/llacb47) * [videa] Fix some extraction errors by [nyuszika7h](https://github.com/nyuszika7h) * [VrtNU] Handle login errors by [llacb47](https://github.com/llacb47) * [vrv] Don't raise error when thumbnails are missing * [youtube] Cleanup authentication code by [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix `--mark-watched` with `--cookies-from-browser` * [youtube] Improvements to JS player extraction and add extractor-args to skip it by [coletdjnz](https://github.com/coletdjnz) * [youtube] Retry on 'Unknown Error' by [coletdjnz](https://github.com/coletdjnz) * [youtube] Return full URL instead of just ID * [youtube] Warn when trying to download clips * [zdf] Improve format sorting * [zype] Extract subtitles from the m3u8 manifest by [fstirlitz](https://github.com/fstirlitz) * Allow `--force-write-archive` to work with `--flat-playlist` * Download subtitles in order of `--sub-langs` * Allow `0` in `--playlist-items` * Handle more playlist errors with `-i` * Fix `--no-get-comments` * Fix `extra_info` being reused across runs * Fix compat options `no-direct-merge` and `playlist-index` * Dump files should obey `--trim-filename` by [sulyi](https://github.com/sulyi) * [aes] Add `aes_gcm_decrypt_and_verify` by [sulyi](https://github.com/sulyi), [pukkandan](https://github.com/pukkandan) * [aria2c] Fix IV for some AES-128 streams by [shirt](https://github.com/shirt-dev) * [compat] Don't ignore `HOME` (if set) on windows * [cookies] Make browser names case insensitive * [cookies] Print warning for cookie decoding error only once * [extractor] Fix root-relative URLs in MPD by [DigitalDJ](https://github.com/DigitalDJ) * [ffmpeg] Add `aac_adtstoasc` when merging if needed * [fragment,aria2c] Generalize and refactor some code * [fragment] Avoid repeated request for AES key * [fragment] Fix range header when using `-N` and media sequence by [shirt](https://github.com/shirt-dev) * [hls,aes] Fallback to native implementation for AES-CBC and detect `Cryptodome` in addition to `Crypto` * [hls] Byterange + AES128 is supported by native downloader * [ModifyChapters] Improve sponsor chapter merge algorithm by [nihil-admirari](https://github.com/nihil-admirari) * [ModifyChapters] Minor fixes * [WebVTT] Adjust parser to accommodate PBS subtitles * [utils] Improve `extract_timezone` by [dirkf](https://github.com/dirkf) * [options] Fix `--no-config` and refactor reading of config files * [options] Strip spaces and ignore empty entries in list-like switches * [test/cookies] Improve logging * [build] Automate more of the release process by [animelover1984](https://github.com/animelover1984), [pukkandan](https://github.com/pukkandan) * [build] Fix sha256 by [nihil-admirari](https://github.com/nihil-admirari) * [build] Bring back brew taps by [nao20010128nao](https://github.com/nao20010128nao) * [build] Provide `--onedir` zip for windows by [pukkandan](https://github.com/pukkandan) * [cleanup,docs] Add deprecation warning in docs for some counter intuitive behaviour * [cleanup] Fix line endings for `nebula.py` by [glenn-slayden](https://github.com/glenn-slayden) * [cleanup] Improve `make clean-test` by [sulyi](https://github.com/sulyi) * [cleanup] Misc ### 2021.09.02 * **Native SponsorBlock** implementation by [nihil-admirari](https://github.com/nihil-admirari), [pukkandan](https://github.com/pukkandan) * `--sponsorblock-remove CATS` removes specified chapters from file * `--sponsorblock-mark CATS` marks the specified sponsor sections as chapters * `--sponsorblock-chapter-title TMPL` to specify sponsor chapter template * `--sponsorblock-api URL` to use a different API * No re-encoding is done unless `--force-keyframes-at-cuts` is used * The fetched sponsor sections are written to the infojson * Deprecates: `--sponskrub`, `--no-sponskrub`, `--sponskrub-cut`, `--no-sponskrub-cut`, `--sponskrub-force`, `--no-sponskrub-force`, `--sponskrub-location`, `--sponskrub-args` * Split `--embed-chapters` from `--embed-metadata` (it still implies the former by default) * Add option `--remove-chapters` to remove arbitrary chapters by [nihil-admirari](https://github.com/nihil-admirari), [pukkandan](https://github.com/pukkandan) * Add option `--force-keyframes-at-cuts` for more accurate cuts when removing and splitting chapters by [nihil-admirari](https://github.com/nihil-admirari) * Let `--match-filter` reject entries early * Makes redundant: `--match-title`, `--reject-title`, `--min-views`, `--max-views` * [lazy_extractor] Improvements (It now passes all tests) * Bugfix for when plugin directory doesn't exist by [kidonng](https://github.com/kidonng) * Create instance only after pre-checking archive * Import actual class if an attribute is accessed * Fix `suitable` and add flake8 test * [downloader/ffmpeg] Experimental support for DASH manifests (including live) * Your ffmpeg must have [this patch](https://github.com/FFmpeg/FFmpeg/commit/3249c757aed678780e22e99a1a49f4672851bca9) applied for YouTube DASH to work * [downloader/ffmpeg] Allow passing custom arguments before `-i` * [BannedVideo] Add extractor by [smege1001](https://github.com/smege1001), [blackjack4494](https://github.com/blackjack4494), [pukkandan](https://github.com/pukkandan) * [bilibili] Add category extractor by [animelover1984](https://github.com/animelover1984) * [Epicon] Add extractors by [Ashish0804](https://github.com/Ashish0804) * [filmmodu] Add extractor by [mzbaulhaque](https://github.com/mzbaulhaque) * [GabTV] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [Hungama] Fix `HungamaSongIE` and add `HungamaAlbumPlaylistIE` by [Ashish0804](https://github.com/Ashish0804) * [ManotoTV] Add new extractors by [tandy1000](https://github.com/tandy1000) * [Niconico] Add Search extractors by [animelover1984](https://github.com/animelover1984), [pukkandan](https://github.com/pukkandan) * [Patreon] Add `PatreonUserIE` by [zenerdi0de](https://github.com/zenerdi0de) * [peloton] Add extractor by [IONECarter](https://github.com/IONECarter), [capntrips](https://github.com/capntrips), [pukkandan](https://github.com/pukkandan) * [ProjectVeritas] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [radiko] Add extractors by [nao20010128nao](https://github.com/nao20010128nao) * [StarTV] Add extractor for `startv.com.tr` by [mrfade](https://github.com/mrfade), [coletdjnz](https://github.com/coletdjnz) * [tiktok] Add `TikTokUserIE` by [Ashish0804](https://github.com/Ashish0804), [pukkandan](https://github.com/pukkandan) * [Tokentube] Add extractor by [u-spec-png](https://github.com/u-spec-png) * [TV2Hu] Fix `TV2HuIE` and add `TV2HuSeriesIE` by [Ashish0804](https://github.com/Ashish0804) * [voicy] Add extractor by [nao20010128nao](https://github.com/nao20010128nao) * [adobepass] Fix Verizon SAML login by [nyuszika7h](https://github.com/nyuszika7h), [ParadoxGBB](https://github.com/ParadoxGBB) * [afreecatv] Fix adult VODs by [wlritchi](https://github.com/wlritchi) * [afreecatv] Tolerate failure to parse date string by [wlritchi](https://github.com/wlritchi) * [aljazeera] Fix extractor by [MinePlayersPE](https://github.com/MinePlayersPE) * [ATV.at] Fix extractor for ATV.at by [NeroBurner](https://github.com/NeroBurner), [coletdjnz](https://github.com/coletdjnz) * [bitchute] Fix test by [mahanstreamer](https://github.com/mahanstreamer) * [camtube] Remove obsolete extractor by [alerikaisattera](https://github.com/alerikaisattera) * [CDA] Add more formats by [u-spec-png](https://github.com/u-spec-png) * [eroprofile] Fix page skipping in albums by [jhwgh1968](https://github.com/jhwgh1968) * [facebook] Fix format sorting * [facebook] Fix metadata extraction by [kikuyan](https://github.com/kikuyan) * [facebook] Update onion URL by [Derkades](https://github.com/Derkades) * [HearThisAtIE] Fix extractor by [Ashish0804](https://github.com/Ashish0804) * [instagram] Add referrer to prevent throttling by [u-spec-png](https://github.com/u-spec-png), [kikuyan](https://github.com/kikuyan) * [iwara.tv] Extract more metadata by [BunnyHelp](https://github.com/BunnyHelp) * [iwara] Add thumbnail by [i6t](https://github.com/i6t) * [kakao] Fix extractor * [mediaset] Fix extraction for some videos by [nyuszika7h](https://github.com/nyuszika7h) * [Motherless] Fix extractor by [coletdjnz](https://github.com/coletdjnz) * [Nova] fix extractor by [std-move](https://github.com/std-move) * [ParamountPlus] Fix geo verification by [shirt](https://github.com/shirt-dev) * [peertube] handle new video URL format by [Chocobozzz](https://github.com/Chocobozzz) * [pornhub] Separate and fix playlist extractor by [mzbaulhaque](https://github.com/mzbaulhaque) * [reddit] Fix for quarantined subreddits by [ouwou](https://github.com/ouwou) * [ShemarooMe] Fix extractor by [Ashish0804](https://github.com/Ashish0804) * [soundcloud] Refetch `client_id` on 403 * [tiktok] Fix metadata extraction * [TV2] Fix extractor by [Ashish0804](https://github.com/Ashish0804) * [tv5mondeplus] Fix extractor by [korli](https://github.com/korli) * [VH1,TVLand] Fix extractors by [Sipherdrakon](https://github.com/Sipherdrakon) * [Viafree] Fix extractor and extract subtitles by [coletdjnz](https://github.com/coletdjnz) * [XHamster] Extract `uploader_id` by [octotherp](https://github.com/octotherp) * [youtube] Add `shorts` to `_VALID_URL` * [youtube] Add av01 itags to known formats list by [blackjack4494](https://github.com/blackjack4494) * [youtube] Extract error messages from HTTPError response by [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix subtitle names * [youtube] Prefer audio stream that YouTube considers default * [youtube] Remove annotations and deprecate `--write-annotations` by [coletdjnz](https://github.com/coletdjnz) * [Zee5] Fix extractor and add subtitles by [Ashish0804](https://github.com/Ashish0804) * [aria2c] Obey `--rate-limit` * [EmbedSubtitle] Continue even if some files are missing * [extractor] Better error message for DRM * [extractor] Common function `_match_valid_url` * [extractor] Show video id in error messages if possible * [FormatSort] Remove priority of `lang` * [options] Add `_set_from_options_callback` * [SubtitleConvertor] Fix bug during subtitle conversion * [utils] Add `parse_qs` * [webvtt] Fix timestamp overflow adjustment by [fstirlitz](https://github.com/fstirlitz) * Bugfix for `--replace-in-metadata` * Don't try to merge with final extension * Fix `--force-overwrites` when using `-k` * Fix `--no-prefer-free-formats` by [CeruleanSky](https://github.com/CeruleanSky) * Fix `-F` for extractors that directly return url * Fix `-J` when there are failed videos * Fix `extra_info` being reused across runs * Fix `playlist_index` not obeying `playlist_start` and add tests * Fix resuming of single formats when using `--no-part` * Revert erroneous use of the `Content-Length` header by [fstirlitz](https://github.com/fstirlitz) * Use `os.replace` where applicable by; paulwrubel * [build] Add homebrew taps `yt-dlp/taps/yt-dlp` by [nao20010128nao](https://github.com/nao20010128nao) * [build] Fix bug in making `yt-dlp.tar.gz` * [docs] Fix some typos by [pukkandan](https://github.com/pukkandan), [zootedb0t](https://github.com/zootedb0t) * [cleanup] Replace improper use of tab in trovo by [glenn-slayden](https://github.com/glenn-slayden) ### 2021.08.10 * Add option `--replace-in-metadata` * Add option `--no-simulate` to not simulate even when `--print` or `--list...` are used - Deprecates `--print-json` * Allow entire infodict to be printed using `%()s` - makes `--dump-json` redundant * Allow multiple `--exec` and `--exec-before-download` * Add regex to `--match-filter` * Add all format filtering operators also to `--match-filter` by [max-te](https://github.com/max-te) * Add compat-option `no-keep-subs` * [adobepass] Add MSO Cablevision by [Jessecar96](https://github.com/Jessecar96) * [BandCamp] Add BandcampMusicIE by [Ashish0804](https://github.com/Ashish0804) * [blackboardcollaborate] Add new extractor by [mzbaulhaque](https://github.com/mzbaulhaque) * [eroprofile] Add album downloader by [jhwgh1968](https://github.com/jhwgh1968) * [mirrativ] Add extractors by [nao20010128nao](https://github.com/nao20010128nao) * [openrec] Add extractors by [nao20010128nao](https://github.com/nao20010128nao) * [nbcolympics:stream] Fix extractor by [nchilada](https://github.com/nchilada), [pukkandan](https://github.com/pukkandan) * [nbcolympics] Update extractor for 2020 olympics by [wesnm](https://github.com/wesnm) * [paramountplus] Separate extractor and fix some titles by [shirt](https://github.com/shirt-dev), [pukkandan](https://github.com/pukkandan) * [RCTIPlus] Support events and TV by [MinePlayersPE](https://github.com/MinePlayersPE) * [Newgrounds] Improve extractor and fix playlist by [u-spec-png](https://github.com/u-spec-png) * [aenetworks] Update `_THEPLATFORM_KEY` and `_THEPLATFORM_SECRET` by [wesnm](https://github.com/wesnm) * [crunchyroll] Fix thumbnail by [funniray](https://github.com/funniray) * [HotStar] Use API for metadata and extract subtitles by [Ashish0804](https://github.com/Ashish0804) * [instagram] Fix comments extraction by [u-spec-png](https://github.com/u-spec-png) * [peertube] Fix videos without description by [u-spec-png](https://github.com/u-spec-png) * [twitch:clips] Extract `display_id` by [dirkf](https://github.com/dirkf) * [viki] Print error message from API request * [Vine] Remove invalid formats by [u-spec-png](https://github.com/u-spec-png) * [VrtNU] Fix XSRF token by [pgaig](https://github.com/pgaig) * [vrv] Fix thumbnail extraction by [funniray](https://github.com/funniray) * [youtube] Add extractor-arg `include-live-dash` to show live dash formats * [youtube] Improve signature function detection by [PSlava](https://github.com/PSlava) * [youtube] Raise appropriate error when API pages can't be downloaded * Ensure `_write_ytdl_file` closes file handle on error * Fix `--compat-options filename` by [stdedos](https://github.com/stdedos) * Fix issues with infodict sanitization * Fix resuming when using `--no-part` * Fix wrong extension for intermediate files * Handle `BrokenPipeError` by [kikuyan](https://github.com/kikuyan) * Show libraries present in verbose head * [extractor] Detect `sttp` as subtitles in MPD by [fstirlitz](https://github.com/fstirlitz) * [extractor] Reset non-repeating warnings per video * [ffmpeg] Fix streaming `mp4` to `stdout` * [ffpmeg] Allow `--ffmpeg-location` to be a file with different name * [utils] Fix `InAdvancePagedList.__getitem__` * [utils] Fix `traverse_obj` depth when `is_user_input` * [webvtt] Merge daisy-chained duplicate cues by [fstirlitz](https://github.com/fstirlitz) * [build] Use custom build of `pyinstaller` by [shirt](https://github.com/shirt-dev) * [tests:download] Add batch testing for extractors (`test_YourExtractor_all`) * [docs] Document which fields `--add-metadata` adds to the file * [docs] Fix some mistakes and improve doc * [cleanup] Misc code cleanup ### 2021.08.02 * Add logo, banner and donate links * [outtmpl] Expand and escape environment variables * [outtmpl] Add format types `j` (json), `l` (comma delimited list), `q` (quoted for terminal) * [downloader] Allow streaming some unmerged formats to stdout using ffmpeg * [youtube] **Age-gate bypass** * Add `agegate` clients by [pukkandan](https://github.com/pukkandan), [MinePlayersPE](https://github.com/MinePlayersPE) * Add `thirdParty` to agegate clients to bypass more videos * Simplify client definitions, expose `embedded` clients * Improve age-gate detection by [coletdjnz](https://github.com/coletdjnz) * Fix default global API key by [coletdjnz](https://github.com/coletdjnz) * Add `creator` clients for age-gate bypass using unverified accounts by [zerodytrash](https://github.com/zerodytrash), [coletdjnz](https://github.com/coletdjnz), [pukkandan](https://github.com/pukkandan) * [adobepass] Add MSO Sling TV by [wesnm](https://github.com/wesnm) * [CBS] Add ParamountPlusSeriesIE by [Ashish0804](https://github.com/Ashish0804) * [dplay] Add `ScienceChannelIE` by [Sipherdrakon](https://github.com/Sipherdrakon) * [UtreonIE] Add extractor by [Ashish0804](https://github.com/Ashish0804) * [youtube] Add `mweb` client by [coletdjnz](https://github.com/coletdjnz) * [youtube] Add `player_client=all` * [youtube] Force `hl=en` for comments by [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix format sorting when using alternate clients * [youtube] Misc cleanup by [pukkandan](https://github.com/pukkandan), [coletdjnz](https://github.com/coletdjnz) * [youtube] Extract SAPISID only once * [CBS] Add fallback by [llacb47](https://github.com/llacb47), [pukkandan](https://github.com/pukkandan) * [Hotstar] Support cookies by [Ashish0804](https://github.com/Ashish0804) * [HotStarSeriesIE] Fix regex by [Ashish0804](https://github.com/Ashish0804) * [bilibili] Improve `_VALID_URL` * [mediaset] Fix extraction by [nixxo](https://github.com/nixxo) * [Mxplayer] Add h265 formats by [Ashish0804](https://github.com/Ashish0804) * [RCTIPlus] Remove PhantomJS dependency by [MinePlayersPE](https://github.com/MinePlayersPE) * [tenplay] Add MA15+ age limit by [pento](https://github.com/pento) * [vidio] Fix login error detection by [MinePlayersPE](https://github.com/MinePlayersPE) * [vimeo] Better extraction of original file by [Ashish0804](https://github.com/Ashish0804) * [generic] Support KVS player (replaces ThisVidIE) by [rigstot](https://github.com/rigstot) * Add compat-option `no-clean-infojson` * Remove `asr` appearing twice in `-F` * Set `home:` as the default key for `-P` * [utils] Fix slicing of reversed `LazyList` * [FormatSort] Fix bug for audio with unknown codec * [test:download] Support testing with `ignore_no_formats_error` * [cleanup] Refactor some code ### 2021.07.24 * [youtube:tab] Extract video duration early * [downloader] Pass `info_dict` to `progress_hook`s * [youtube] Fix age-gated videos for API clients when cookies are supplied by [coletdjnz](https://github.com/coletdjnz) * [youtube] Disable `get_video_info` age-gate workaround - This endpoint seems to be completely dead * [youtube] Try all clients even if age-gated * [youtube] Fix subtitles only being extracted from the first client * [youtube] Simplify `_get_text` * [cookies] bugfix for microsoft edge on macOS * [cookies] Handle `sqlite` `ImportError` gracefully by [mbway](https://github.com/mbway) * [cookies] Handle errors when importing `keyring` ### 2021.07.21 * **Add option `--cookies-from-browser`** to load cookies from a browser by [mbway](https://github.com/mbway) * Usage: `--cookies-from-browser BROWSER[:PROFILE_NAME_OR_PATH]` * Also added `--no-cookies-from-browser` * To decrypt chromium cookies, `keyring` is needed for UNIX and `pycryptodome` for Windows * Add option `--exec-before-download` * Add field `live_status` * [FFmpegMetadata] Add language of each stream and some refactoring * [douyin] Add extractor by [pukkandan](https://github.com/pukkandan), [pyx](https://github.com/pyx) * [pornflip] Add extractor by [mzbaulhaque](https://github.com/mzbaulhaque) * **[youtube] Extract data from multiple clients** by [pukkandan](https://github.com/pukkandan), [coletdjnz](https://github.com/coletdjnz) * `player_client` now accepts multiple clients * Default `player_client` = `android,web` * This uses twice as many requests, but avoids throttling for most videos while also not losing any formats * Music clients can be specifically requested and is enabled by default if `music.youtube.com` * Added `player_client=ios` (Known issue: formats from ios are not sorted correctly) * Add age-gate bypass for android and ios clients * [youtube] Extract more thumbnails * The thumbnail URLs are hard-coded and their actual existence is tested lazily * Added option `--no-check-formats` to not test them * [youtube] Misc fixes * Improve extraction of livestream metadata by [pukkandan](https://github.com/pukkandan), [krichbanana](https://github.com/krichbanana) * Hide live dash formats since they can't be downloaded anyway * Fix authentication when using multiple accounts by [coletdjnz](https://github.com/coletdjnz) * Fix controversial videos when requested via API by [coletdjnz](https://github.com/coletdjnz) * Fix session index extraction and headers for non-web player clients by [coletdjnz](https://github.com/coletdjnz) * Make `--extractor-retries` work for more errors * Fix sorting of 3gp format * Sanity check `chapters` (and refactor related code) * Make `parse_time_text` and `_extract_chapters` non-fatal * Misc cleanup and bug fixes by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Fix channels tab * [youtube:tab] Extract playlist availability by [coletdjnz](https://github.com/coletdjnz) * **[youtube:comments] Move comment extraction to new API** by [coletdjnz](https://github.com/coletdjnz) * Adds extractor-args `comment_sort` (`top`/`new`), `max_comments`, `max_comment_depth` * [youtube:comments] Fix `is_favorited`, improve `like_count` parsing by [coletdjnz](https://github.com/coletdjnz) * [BravoTV] Improve metadata extraction by [kevinoconnor7](https://github.com/kevinoconnor7) * [crunchyroll:playlist] Force http * [yahoo:gyao:player] Relax `_VALID_URL` by [nao20010128nao](https://github.com/nao20010128nao) * [nebula] Authentication via tokens from cookie jar by [hheimbuerger](https://github.com/hheimbuerger), [TpmKranz](https://github.com/TpmKranz) * [RTP] Fix extraction and add subtitles by [fstirlitz](https://github.com/fstirlitz) * [viki] Rewrite extractors and add extractor-arg `video_types` to `vikichannel` by [zackmark29](https://github.com/zackmark29), [pukkandan](https://github.com/pukkandan) * [vlive] Extract thumbnail directly in addition to the one from Naver * [generic] Extract previously missed subtitles by [fstirlitz](https://github.com/fstirlitz) * [generic] Extract everything in the SMIL manifest and detect discarded subtitles by [fstirlitz](https://github.com/fstirlitz) * [embedthumbnail] Fix `_get_thumbnail_resolution` * [metadatafromfield] Do not detect numbers as field names * Fix selectors `all`, `mergeall` and add tests * Errors in playlist extraction should obey `--ignore-errors` * Fix bug where `original_url` was not propagated when `_type`=`url` * Revert "Merge webm formats into mkv if thumbnails are to be embedded (#173)" * This was wrongly checking for `write_thumbnail` * Improve `extractor_args` parsing * Rename `NOTE` in `-F` to `MORE INFO` since it's often confused to be the same as `format_note` * Add `only_once` param for `write_debug` and `report_warning` * [extractor] Allow extracting multiple groups in `_search_regex` by [fstirlitz](https://github.com/fstirlitz) * [utils] Improve `traverse_obj` * [utils] Add `variadic` * [utils] Improve `js_to_json` comment regex by [fstirlitz](https://github.com/fstirlitz) * [webtt] Fix timestamps * [compat] Remove unnecessary code * [docs] fix default of multistreams ### 2021.07.07 * Merge youtube-dl: Upto [commit/a803582](https://github.com/ytdl-org/youtube-dl/commit/a8035827177d6b59aca03bd717acb6a9bdd75ada) * Add `--extractor-args` to pass some extractor-specific arguments. See [readme](https://github.com/yt-dlp/yt-dlp#extractor-arguments) * Add extractor option `skip` for `youtube`. Eg: `--extractor-args youtube:skip=hls,dash` * Deprecates `--youtube-skip-dash-manifest`, `--youtube-skip-hls-manifest`, `--youtube-include-dash-manifest`, `--youtube-include-hls-manifest` * Allow `--list...` options to work with `--print`, `--quiet` and other `--list...` options * [youtube] Use `player` API for additional video extraction requests by [coletdjnz](https://github.com/coletdjnz) * **Fixes youtube premium music** (format 141) extraction * Adds extractor option `player_client` = `web`/`android` * **`--extractor-args youtube:player_client=android` works around the throttling** for the time-being * Adds extractor option `player_skip=config` * Adds age-gate fallback using embedded client * [youtube] Choose correct Live chat API for upcoming streams by [krichbanana](https://github.com/krichbanana) * [youtube] Fix subtitle names for age-gated videos * [youtube:comments] Fix error handling and add `itct` to params by [coletdjnz](https://github.com/coletdjnz) * [youtube_live_chat] Fix download with cookies by [siikamiika](https://github.com/siikamiika) * [youtube_live_chat] use `clickTrackingParams` by [siikamiika](https://github.com/siikamiika) * [Funimation] Rewrite extractor * Add `FunimationShowIE` by [Mevious](https://github.com/Mevious) * **Treat the different versions of an episode as different formats of a single video** * This changes the video `id` and will break break existing archives * Compat option `seperate-video-versions` to fall back to old behavior including using the old video ids * Support direct `/player/` URL * Extractor options `language` and `version` to pre-select them during extraction * These options may be removed in the future if we can extract all formats without additional network requests * Do not rely on these for format selection and use `-f` filters instead * [AdobePass] Add Spectrum MSO by [kevinoconnor7](https://github.com/kevinoconnor7), [ohmybahgosh](https://github.com/ohmybahgosh) * [facebook] Extract description and fix title * [fancode] Fix extraction, support live and allow login with refresh token by [zenerdi0de](https://github.com/zenerdi0de) * [plutotv] Improve `_VALID_URL` * [RCTIPlus] Add extractor by [MinePlayersPE](https://github.com/MinePlayersPE) * [Soundcloud] Allow login using oauth token by [blackjack4494](https://github.com/blackjack4494) * [TBS] Support livestreams by [llacb47](https://github.com/llacb47) * [videa] Fix extraction by [nyuszika7h](https://github.com/nyuszika7h) * [yahoo] Fix extraction by [llacb47](https://github.com/llacb47), [pukkandan](https://github.com/pukkandan) * Process videos when using `--ignore-no-formats-error` by [krichbanana](https://github.com/krichbanana) * Fix `--throttled-rate` when using `--load-info-json` * Fix `--flat-playlist` when entry has no `ie_key` * Fix `check_formats` catching `ExtractorError` instead of `DownloadError` * Fix deprecated option `--list-formats-old` * [downloader/ffmpeg] Fix `--ppa` when using simultaneous download * [extractor] Prevent unnecessary download of hls manifests and refactor `hls_split_discontinuity` * [fragment] Handle status of download and errors in threads correctly; and minor refactoring * [thumbnailsconvertor] Treat `jpeg` as `jpg` * [utils] Fix issues with `LazyList` reversal * [extractor] Allow extractors to set their own login hint * [cleanup] Simplify format selector code with `LazyList` and `yield from` * [cleanup] Clean `extractor.common._merge_subtitles` signature * [cleanup] Fix some typos ### 2021.06.23 * Merge youtube-dl: Upto [commit/379f52a](https://github.com/ytdl-org/youtube-dl/commit/379f52a4954013767219d25099cce9e0f9401961) * **Add option `--throttled-rate`** below which video data is re-extracted * [fragment] **Merge during download for `-N`**, and refactor `hls`/`dash` * [websockets] Add `WebSocketFragmentFD` by [nao20010128nao](https://github.com/nao20010128nao), [pukkandan](https://github.com/pukkandan) * Allow `images` formats in addition to video/audio * [downloader/mhtml] Add new downloader for slideshows/storyboards by [fstirlitz](https://github.com/fstirlitz) * [youtube] Temporary **fix for age-gate** * [youtube] Support ongoing live chat by [siikamiika](https://github.com/siikamiika) * [youtube] Improve SAPISID cookie handling by [coletdjnz](https://github.com/coletdjnz) * [youtube] Login is not needed for `:ytrec` * [youtube] Non-fatal alert reporting for unavailable videos page by [coletdjnz](https://github.com/coletdjnz) * [twitcasting] Websocket support by [nao20010128nao](https://github.com/nao20010128nao) * [mediasite] Extract slides by [fstirlitz](https://github.com/fstirlitz) * [funimation] Extract subtitles * [pornhub] Extract `cast` * [hotstar] Use server time for authentication instead of local time * [EmbedThumbnail] Fix for already downloaded thumbnail * [EmbedThumbnail] Add compat-option `embed-thumbnail-atomicparsley` * Expand `--check-formats` to thumbnails * Fix id sanitization in filenames * Skip fixup of existing files and add `--fixup force` to force it * Better error handling of syntax errors in `-f` * Use `NamedTemporaryFile` for `--check-formats` * [aria2c] Lower `--min-split-size` for HTTP downloads * [options] Rename `--add-metadata` to `--embed-metadata` * [utils] Improve `LazyList` and add tests * [build] Build Windows x86 version with py3.7 and remove redundant tests by [pukkandan](https://github.com/pukkandan), [shirt](https://github.com/shirt-dev) * [docs] Clarify that `--embed-metadata` embeds chapter markers * [cleanup] Refactor fixup ### 2021.06.09 * Fix bug where `%(field)d` in filename template throws error * [outtmpl] Improve offset parsing * [test] More rigorous tests for `prepare_filename` ### 2021.06.08 * Remove support for obsolete Python versions: Only 3.6+ is now supported * Merge youtube-dl: Upto [commit/c2350ca](https://github.com/ytdl-org/youtube-dl/commit/c2350cac243ba1ec1586fe85b0d62d1b700047a2) * [hls] Fix decryption for multithreaded downloader * [extractor] Fix pre-checking archive for some extractors * [extractor] Fix FourCC fallback when parsing ISM by [fstirlitz](https://github.com/fstirlitz) * [twitcasting] Add TwitCastingUserIE, TwitCastingLiveIE by [pukkandan](https://github.com/pukkandan), [nao20010128nao](https://github.com/nao20010128nao) * [vidio] Add VidioPremierIE and VidioLiveIE by [MinePlayersPE](Https://github.com/MinePlayersPE) * [viki] Fix extraction from [ytdl-org/youtube-dl@59e583f](https://github.com/ytdl-org/youtube-dl/commit/59e583f7e8530ca92776c866897d895c072e2a82) * [youtube] Support shorts URL * [zoom] Extract transcripts as subtitles * Add field `original_url` with the user-inputted URL * Fix and refactor `prepare_outtmpl` * Make more fields available for `--print` when used with `--flat-playlist` * [utils] Generalize `traverse_dict` to `traverse_obj` * [downloader/ffmpeg] Hide FFmpeg banner unless in verbose mode by [fstirlitz](https://github.com/fstirlitz) * [build] Release `yt-dlp.tar.gz` * [build,update] Add GNU-style SHA512 and prepare updater for simlar SHA256 by [nihil-admirari](https://github.com/nihil-admirari) * [pyinst] Show Python version in exe metadata by [nihil-admirari](https://github.com/nihil-admirari) * [docs] Improve documentation of dependencies * [cleanup] Mark unused files * [cleanup] Point all shebang to `python3` by [fstirlitz](https://github.com/fstirlitz) * [cleanup] Remove duplicate file `trovolive.py` ### 2021.06.01 * Merge youtube-dl: Upto [commit/d495292](https://github.com/ytdl-org/youtube-dl/commit/d495292852b6c2f1bd58bc2141ff2b0265c952cf) * Pre-check archive and filters during playlist extraction * Handle Basic Auth `user:pass` in URLs by [hhirtz](https://github.com/hhirtz) and [pukkandan](https://github.com/pukkandan) * [archiveorg] Add YoutubeWebArchiveIE by [coletdjnz](https://github.com/coletdjnz) and [alex-gedeon](https://github.com/alex-gedeon) * [fancode] Add extractor by [rhsmachine](https://github.com/rhsmachine) * [patreon] Support vimeo embeds by [rhsmachine](https://github.com/rhsmachine) * [Saitosan] Add new extractor by [llacb47](https://github.com/llacb47) * [ShemarooMe] Add extractor by [Ashish0804](https://github.com/Ashish0804) and [pukkandan](https://github.com/pukkandan) * [telemundo] Add extractor by [king-millez](https://github.com/king-millez) * [SonyLIV] Add SonyLIVSeriesIE and subtitle support by [Ashish0804](https://github.com/Ashish0804) * [Hotstar] Add HotStarSeriesIE by [Ashish0804](https://github.com/Ashish0804) * [Voot] Add VootSeriesIE by [Ashish0804](https://github.com/Ashish0804) * [vidio] Support login and premium videos by [MinePlayersPE](https://github.com/MinePlayersPE) * [fragment] When using `-N`, do not keep the fragment content in memory * [ffmpeg] Download and merge in a single step if possible * [ThumbnailsConvertor] Support conversion to `png` and make it the default by [louie-github](https://github.com/louie-github) * [VideoConvertor] Generalize with remuxer and allow conditional recoding * [EmbedThumbnail] Embed in `mp4`/`m4a` using mutagen by [tripulse](https://github.com/tripulse) and [pukkandan](https://github.com/pukkandan) * [EmbedThumbnail] Embed if any thumbnail was downloaded, not just the best * [EmbedThumbnail] Correctly escape filename * [update] replace self without launching a subprocess in windows * [update] Block further update for unsupported systems * Refactor `__process_playlist` by creating `LazyList` * Write messages to `stderr` when both `quiet` and `verbose` * Sanitize and sort playlist thumbnails * Remove `None` values from `info.json` * [extractor] Always prefer native hls downloader by default * [extractor] Skip subtitles without URI in m3u8 manifests by [hheimbuerger](https://github.com/hheimbuerger) * [extractor] Functions to parse `socket.io` response as `json` by [pukkandan](https://github.com/pukkandan) and [llacb47](https://github.com/llacb47) * [extractor] Allow `note=False` when extracting manifests * [utils] Escape URLs in `sanitized_Request`, not `sanitize_url` * [hls] Disable external downloader for `webtt` * [youtube] `/live` URLs should raise error if channel is not live * [youtube] Bug fixes * [zee5] Fix m3u8 formats' extension * [ard] Allow URLs without `-` before id by [olifre](https://github.com/olifre) * [cleanup] `YoutubeDL._match_entry` * [cleanup] Refactor updater * [cleanup] Refactor ffmpeg convertors * [cleanup] setup.py ### 2021.05.20 * **Youtube improvements**: * Support youtube music `MP`, `VL` and `browse` pages * Extract more formats for youtube music by [craftingmod](https://github.com/craftingmod), [coletdjnz](https://github.com/coletdjnz) and [pukkandan](https://github.com/pukkandan) * Extract multiple subtitles in same language by [pukkandan](https://github.com/pukkandan) and [tpikonen](https://github.com/tpikonen) * Redirect channels that doesn't have a `videos` tab to their `UU` playlists * Support in-channel search * Sort audio-only formats correctly * Always extract `maxresdefault` thumbnail * Extract audio language * Add subtitle language names by [nixxo](https://github.com/nixxo) and [tpikonen](https://github.com/tpikonen) * Show alerts only from the final webpage * Add `html5=1` param to `get_video_info` page requests by [coletdjnz](https://github.com/coletdjnz) * Better message when login required * **Add option `--print`**: to print any field/template * Makes redundant: `--get-description`, `--get-duration`, `--get-filename`, `--get-format`, `--get-id`, `--get-thumbnail`, `--get-title`, `--get-url` * Field `additional_urls` to download additional videos from metadata using [`--parse-metadata`](https://github.com/yt-dlp/yt-dlp#modifying-metadata) * Merge youtube-dl: Upto [commit/dfbbe29](https://github.com/ytdl-org/youtube-dl/commit/dfbbe2902fc67f0f93ee47a8077c148055c67a9b) * Write thumbnail of playlist and add `pl_thumbnail` outtmpl key * [embedthumbnail] Add `flac` support and refactor `mutagen` code by [pukkandan](https://github.com/pukkandan) and [tripulse](https://github.com/tripulse) * [audius:artist] Add extractor by [king-millez](https://github.com/king-millez) * [parlview] Add extractor by [king-millez](https://github.com/king-millez) * [tenplay] Fix extractor by [king-millez](https://github.com/king-millez) * [rmcdecouverte] Generalize `_VALID_URL` * Add compat-option `no-attach-infojson` * Add field `name` for subtitles * Ensure `post_extract` and `pre_process` only run once * Fix `--check-formats` when there is network error * Standardize `write_debug` and `get_param` * [options] Alias `--write-comments`, `--no-write-comments` * [options] Refactor callbacks * [test:download] Only extract enough videos for `playlist_mincount` * [extractor] bugfix for when `compat_opts` is not given * [build] Fix x86 build by [shirt](https://github.com/shirt-dev) * [cleanup] code formatting, youtube tests and readme ### 2021.05.11 * **Deprecate support for python versions < 3.6** * **Subtitle extraction from manifests** by [fstirlitz](https://github.com/fstirlitz). See [be6202f](https://github.com/yt-dlp/yt-dlp/commit/be6202f12b97858b9d716e608394b51065d0419f) for details * **Improve output template:** * Allow slicing lists/strings using `field.start:end:step` * A field can also be used as offset like `field1+num+field2` * A default value can be given using `field|default` * Prevent invalid fields from causing errors * **Merge youtube-dl**: Upto [commit/a726009](https://github.com/ytdl-org/youtube-dl/commit/a7260099873acc6dc7d76cafad2f6b139087afd0) * **Remove options** `-l`, `-t`, `-A` completely and disable `--auto-number`, `--title`, `--literal`, `--id` * [Plugins] Prioritize plugins over standard extractors and prevent plugins from overwriting the standard extractor classes * [downloader] Fix `quiet` and `to_stderr` * [fragment] Ensure the file is closed on error * [fragment] Make sure first segment is not skipped * [aria2c] Fix whitespace being stripped off * [embedthumbnail] Fix bug where jpeg thumbnails were converted again * [FormatSort] Fix for when some formats have quality and others don't * [utils] Add `network_exceptions` * [utils] Escape URL while sanitizing * [ukcolumn] Add Extractor * [whowatch] Add extractor by [nao20010128nao](https://github.com/nao20010128nao) * [CBS] Improve `_VALID_URL` to support movies * [crackle] Improve extraction * [curiositystream] Fix collections * [francetvinfo] Improve video id extraction * [generic] Respect the encoding in manifest * [limelight] Obey `allow_unplayable_formats` * [mediasite] Generalize URL pattern by [fstirlitz](https://github.com/fstirlitz) * [mxplayer] Add MxplayerShowIE by [Ashish0804](https://github.com/Ashish0804) * [nebula] Move to nebula.app by [Lamieur](https://github.com/Lamieur) * [niconico] Fix HLS formats by [CXwudi](https://github.com/CXwudi), [tsukumijima](https://github.com/tsukumijima), [nao20010128nao](https://github.com/nao20010128nao) and [pukkandan](https://github.com/pukkandan) * [niconico] Fix title and thumbnail extraction by [CXwudi](https://github.com/CXwudi) * [plutotv] Extract subtitles from manifests * [plutotv] Fix format extraction for some urls * [rmcdecouverte] Improve `_VALID_URL` * [sonyliv] Fix `title` and `series` extraction by [Ashish0804](https://github.com/Ashish0804) * [tubi] Raise "no video formats" error when video url is empty * [youtube:tab] Detect playlists inside community posts * [youtube] Add `oembed` to reserved names * [zee5] Fix extraction for some URLs by [Hadi0609](https://github.com/Hadi0609) * [zee5] Fix py2 compatibility * Fix `playlist_index` and add `playlist_autonumber`. See [#302](https://github.com/yt-dlp/yt-dlp/issues/302) for details * Add experimental option `--check-formats` to test the URLs before format selection * Option `--compat-options` to revert [some of yt-dlp's changes](https://github.com/yt-dlp/yt-dlp#differences-in-default-behavior) * Deprecates `--list-formats-as-table`, `--list-formats-old` * Fix number of digits in `%(playlist_index)s` * Fix case sensitivity of format selector * Revert "[core] be able to hand over id and title using url_result" * Do not strip out whitespaces in `-o` and `-P` * Fix `preload_download_archive` writing verbose message to `stdout` * Move option warnings to `YoutubeDL`so that they obey `--no-warnings` and can output colors * Py2 compatibility for `FileNotFoundError` ### 2021.04.22 * **Improve output template:** * Objects can be traversed like `%(field.key1.key2)s` * An offset can be added to numeric fields as `%(field+N)s` * Deprecates `--autonumber-start` * **Improve `--sub-langs`:** * Treat `--sub-langs` entries as regex * `all` can be used to refer to all the subtitles * language codes can be prefixed with `-` to exclude it * Deprecates `--all-subs` * Add option `--ignore-no-formats-error` to ignore the "no video format" and similar errors * Add option `--skip-playlist-after-errors` to skip the rest of a playlist after a given number of errors are encountered * Merge youtube-dl: Upto [commit/7e8b3f9](https://github.com/ytdl-org/youtube-dl/commit/7e8b3f9439ebefb3a3a4e5da9c0bd2b595976438) * [downloader] Fix bug in downloader selection * [BilibiliChannel] Fix pagination by [nao20010128nao](https://github.com/nao20010128nao) and [pukkandan](https://github.com/pukkandan) * [rai] Add support for http formats by [nixxo](https://github.com/nixxo) * [TubiTv] Add TubiTvShowIE by [Ashish0804](https://github.com/Ashish0804) * [twitcasting] Fix extractor * [viu:ott] Fix extractor and support series by [lkho](https://github.com/lkho) and [pukkandan](https://github.com/pukkandan) * [youtube:tab] Show unavailable videos in playlists by [coletdjnz](https://github.com/coletdjnz) * [youtube:tab] Reload with unavailable videos for all playlists * [youtube] Ignore invalid stretch ratio * [youtube] Improve channel syncid extraction to support ytcfg by [coletdjnz](https://github.com/coletdjnz) * [youtube] Standardize API calls for tabs, mixes and search by [coletdjnz](https://github.com/coletdjnz) * [youtube] Bugfix in `_extract_ytcfg` * [mildom:user:vod] Download only necessary amount of pages * [mildom] Remove proxy completely by [fstirlitz](https://github.com/fstirlitz) * [go] Fix `_VALID_URL` * [MetadataFromField] Improve regex and add tests * [Exec] Ensure backward compatibility when the command contains `%` * [extractor] Fix inconsistent use of `report_warning` * Ensure `mergeall` selects best format when multistreams are disabled * Improve the yt-dlp.sh script by [fstirlitz](https://github.com/fstirlitz) * [lazy_extractor] Do not load plugins * [ci] Disable fail-fast * [docs] Clarify which deprecated options still work * [docs] Fix typos ### 2021.04.11 * Add option `--convert-thumbnails` (only jpg currently supported) * Format selector `mergeall` to download and merge all formats * Pass any field to `--exec` using similar syntax to output template * Choose downloader for each protocol using `--downloader PROTO:NAME` * Alias `--downloader` for `--external-downloader` * Added `native` as an option for the downloader * Merge youtube-dl: Upto [commit/4fb25ff](https://github.com/ytdl-org/youtube-dl/commit/4fb25ff5a3be5206bb72e5c4046715b1529fb2c7) (except vimeo) * [DiscoveryPlusIndia] Add DiscoveryPlusIndiaShowIE by [Ashish0804](https://github.com/Ashish0804) * [NFHSNetwork] Add extractor by [llacb47](https://github.com/llacb47) * [nebula] Add extractor (watchnebula.com) by [hheimbuerger](https://github.com/hheimbuerger) * [nitter] Fix extraction of reply tweets and update instance list by [B0pol](https://github.com/B0pol) * [nitter] Fix thumbnails by [B0pol](https://github.com/B0pol) * [youtube] Fix thumbnail URL * [youtube] Parse API parameters from initial webpage by [coletdjnz](https://github.com/coletdjnz) * [youtube] Extract comments' approximate timestamp by [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix alert extraction * [bilibili] Fix uploader * [utils] Add `datetime_from_str` and `datetime_add_months` by [coletdjnz](https://github.com/coletdjnz) * Run some `postprocessors` before actual download * Improve argument parsing for `-P`, `-o`, `-S` * Fix some `m3u8` not obeying `--allow-unplayable-formats` * Fix default of `dynamic_mpd` * Deprecate `--all-formats`, `--include-ads`, `--hls-prefer-native`, `--hls-prefer-ffmpeg` * [docs] Improvements ### 2021.04.03 * Merge youtube-dl: Upto [commit/654b4f4](https://github.com/ytdl-org/youtube-dl/commit/654b4f4ff2718f38b3182c1188c5d569c14cc70a) * Ability to set a specific field in the file's metadata using `--parse-metadata` * Ability to select n'th best format like `-f bv*.2` * [DiscoveryPlus] Add discoveryplus.in * [la7] Add podcasts and podcast playlists by [nixxo](https://github.com/nixxo) * [mildom] Update extractor with current proxy by [nao20010128nao](https://github.com/nao20010128nao) * [ard:mediathek] Fix video id extraction * [generic] Detect Invidious' link element * [youtube] Show premium state in `availability` by [coletdjnz](https://github.com/coletdjnz) * [viewsource] Add extractor to handle `view-source:` * [sponskrub] Run before embedding thumbnail * [docs] Improve `--parse-metadata` documentation ### 2021.03.24.1 * Revert [commit/8562218](https://github.com/ytdl-org/youtube-dl/commit/8562218350a79d4709da8593bb0c538aa0824acf) ### 2021.03.24 * Merge youtube-dl: Upto 2021.03.25 ([commit/8562218](https://github.com/ytdl-org/youtube-dl/commit/8562218350a79d4709da8593bb0c538aa0824acf)) * Parse metadata from multiple fields using `--parse-metadata` * Ability to load playlist infojson using `--load-info-json` * Write current epoch to infojson when using `--no-clean-infojson` * [youtube_live_chat] fix bug when trying to set cookies * [niconico] Fix for when logged in by [CXwudi](https://github.com/CXwudi) and [xtkoba](https://github.com/xtkoba) * [linuxacadamy] Fix login ### 2021.03.21 * Merge youtube-dl: Upto [commit/7e79ba7](https://github.com/ytdl-org/youtube-dl/commit/7e79ba7dd6e6649dd2ce3a74004b2044f2182881) * Option `--no-clean-infojson` to keep private keys in the infojson * [aria2c] Support retry/abort unavailable fragments by [damianoamatruda](https://github.com/damianoamatruda) * [aria2c] Better default arguments * [movefiles] Fix bugs and make more robust * [formatSort] Fix `quality` being ignored * [splitchapters] Fix for older ffmpeg * [sponskrub] Pass proxy to sponskrub * Make sure `post_hook` gets the final filename * Recursively remove any private keys from infojson * Embed video URL metadata inside `mp4` by [damianoamatruda](https://github.com/damianoamatruda) and [pukkandan](https://github.com/pukkandan) * Merge `webm` formats into `mkv` if thumbnails are to be embedded by [damianoamatruda](https://github.com/damianoamatruda) * Use headers and cookies when downloading subtitles by [damianoamatruda](https://github.com/damianoamatruda) * Parse resolution in info dictionary by [damianoamatruda](https://github.com/damianoamatruda) * More consistent warning messages by [damianoamatruda](https://github.com/damianoamatruda) and [pukkandan](https://github.com/pukkandan) * [docs] Add deprecated options and aliases in readme * [docs] Fix some minor mistakes * [niconico] Partial fix adapted from [animelover1984/youtube-dl@b5eff52](https://github.com/animelover1984/youtube-dl/commit/b5eff52dd9ed5565672ea1694b38c9296db3fade) (login and smile formats still don't work) * [niconico] Add user extractor by [animelover1984](https://github.com/animelover1984) * [bilibili] Add anthology support by [animelover1984](https://github.com/animelover1984) * [amcnetworks] Fix extractor by [2ShedsJackson](https://github.com/2ShedsJackson) * [stitcher] Merge from youtube-dl by [nixxo](https://github.com/nixxo) * [rcs] Improved extraction by [nixxo](https://github.com/nixxo) * [linuxacadamy] Improve regex * [youtube] Show if video is `private`, `unlisted` etc in info (`availability`) by [coletdjnz](https://github.com/coletdjnz) and [pukkandan](https://github.com/pukkandan) * [youtube] bugfix for channel playlist extraction * [nbc] Improve metadata extraction by [2ShedsJackson](https://github.com/2ShedsJackson) ### 2021.03.15 * **Split video by chapters**: using option `--split-chapters` * The output file of the split files can be set with `-o`/`-P` using the prefix `chapter:` * Additional keys `section_title`, `section_number`, `section_start`, `section_end` are available in the output template * **Parallel fragment downloads** by [shirt](https://github.com/shirt-dev) * Use option `--concurrent-fragments` (`-N`) to set the number of threads (default 1) * Merge youtube-dl: Upto [commit/3be0980](https://github.com/ytdl-org/youtube-dl/commit/3be098010f667b14075e3dfad1e74e5e2becc8ea) * [zee5] Add Show Extractor by [Ashish0804](https://github.com/Ashish0804) and [pukkandan](https://github.com/pukkandan) * [rai] fix drm check [nixxo](https://github.com/nixxo) * [wimtv] Add extractor by [nixxo](https://github.com/nixxo) * [mtv] Add mtv.it and extract series metadata by [nixxo](https://github.com/nixxo) * [pluto.tv] Add extractor by [kevinoconnor7](https://github.com/kevinoconnor7) * [youtube] Rewrite comment extraction by [coletdjnz](https://github.com/coletdjnz) * [embedthumbnail] Set mtime correctly * Refactor some postprocessor/downloader code by [pukkandan](https://github.com/pukkandan) and [shirt](https://github.com/shirt-dev) ### 2021.03.07 * [youtube] Fix history, mixes, community pages and trending by [pukkandan](https://github.com/pukkandan) and [coletdjnz](https://github.com/coletdjnz) * [youtube] Fix private feeds/playlists on multi-channel accounts by [coletdjnz](https://github.com/coletdjnz) * [youtube] Extract alerts from continuation by [coletdjnz](https://github.com/coletdjnz) * [cbs] Add support for ParamountPlus by [shirt](https://github.com/shirt-dev) * [mxplayer] Rewrite extractor with show support by [pukkandan](https://github.com/pukkandan) and [Ashish0804](https://github.com/Ashish0804) * [gedi] Improvements from youtube-dl by [nixxo](https://github.com/nixxo) * [vimeo] Fix videos with password by [teesid](https://github.com/teesid) * [lbry] Support `lbry://` url by [nixxo](https://github.com/nixxo) * [bilibili] Change `Accept` header by [pukkandan](https://github.com/pukkandan) and [animelover1984](https://github.com/animelover1984) * [trovo] Pass origin header * [rai] Check for DRM by [nixxo](https://github.com/nixxo) * [downloader] Fix bug for `ffmpeg`/`httpie` * [update] Fix updater removing the executable bit on some UNIX distros * [update] Fix current build hash for UNIX * [docs] Include wget/curl/aria2c install instructions for Unix by [Ashish0804](https://github.com/Ashish0804) * Fix some videos downloading with `m3u8` extension * Remove "fixup is ignored" warning when fixup wasn't passed by user ### 2021.03.03.2 * [build] Fix bug ### 2021.03.03 * [youtube] Use new browse API for continuation page extraction by [coletdjnz](https://github.com/coletdjnz) and [pukkandan](https://github.com/pukkandan) * Fix HLS playlist downloading by [shirt](https://github.com/shirt-dev) * Merge youtube-dl: Upto [2021.03.03](https://github.com/ytdl-org/youtube-dl/releases/tag/2021.03.03) * [mtv] Fix extractor * [nick] Fix extractor by [DennyDai](https://github.com/DennyDai) * [mxplayer] Add new extractor by [codeasashu](https://github.com/codeasashu) * [youtube] Throw error when `--extractor-retries` are exhausted * Reduce default of `--extractor-retries` to 3 * Fix packaging bugs by [hseg](https://github.com/hseg) ### 2021.03.01 * Allow specifying path in `--external-downloader` * Add option `--sleep-requests` to sleep b/w requests * Add option `--extractor-retries` to retry on known extractor errors * Extract comments only when needed * `--get-comments` doesn't imply `--write-info-json` if `-J`, `-j` or `--print-json` are used * Fix `get_executable_path` by [shirt](https://github.com/shirt-dev) * [youtube] Retry on more known errors than just HTTP-5xx * [youtube] Fix inconsistent `webpage_url` * [tennistv] Fix format sorting * [bilibiliaudio] Recognize the file as audio-only * [hrfensehen] Fix wrong import * [viki] Fix viki play pass authentication by [RobinD42](https://github.com/RobinD42) * [readthedocs] Improvements by [shirt](https://github.com/shirt-dev) * [hls] Fix bug with m3u8 format extraction * [hls] Enable `--hls-use-mpegts` by default when downloading live-streams * [embedthumbnail] Fix bug with deleting original thumbnail * [build] Fix completion paths, zsh pip completion install by [hseg](https://github.com/hseg) * [ci] Disable download tests unless specifically invoked * Cleanup some code and fix typos ### 2021.02.24 * Moved project to an organization [yt-dlp](https://github.com/yt-dlp) * **Completely changed project name to yt-dlp** by [Pccode66](https://github.com/Pccode66) and [pukkandan](https://github.com/pukkandan) * Also, `youtube-dlc` config files are no longer loaded * Merge youtube-dl: Upto [commit/4460329](https://github.com/ytdl-org/youtube-dl/commit/44603290e5002153f3ebad6230cc73aef42cc2cd) (except tmz, gedi) * [Readthedocs](https://yt-dlp.readthedocs.io) support by [shirt](https://github.com/shirt-dev) * [youtube] Show if video was a live stream in info (`was_live`) * [Zee5] Add new extractor by [Ashish0804](https://github.com/Ashish0804) and [pukkandan](https://github.com/pukkandan) * [jwplatform] Add support for `hyland.com` * [tennistv] Fix extractor * [hls] Support media initialization by [shirt](https://github.com/shirt-dev) * [hls] Added options `--hls-split-discontinuity` to better support media discontinuity by [shirt](https://github.com/shirt-dev) * [ffmpeg] Allow passing custom arguments before -i using `--ppa "ffmpeg_i1:ARGS"` syntax * Fix `--windows-filenames` removing `/` from UNIX paths * [hls] Show warning if pycryptodome is not found * [docs] Improvements * Fix documentation of `Extractor Options` * Document `all` in format selection * Document `playable_in_embed` in output templates ### 2021.02.19 * Merge youtube-dl: Upto [commit/cf2dbec](https://github.com/ytdl-org/youtube-dl/commit/cf2dbec6301177a1fddf72862de05fa912d9869d) (except kakao) * [viki] Fix extractor * [niconico] Extract `channel` and `channel_id` by [kurumigi](https://github.com/kurumigi) * [youtube] Multiple page support for hashtag URLs * [youtube] Add more invidious instances * [youtube] Fix comment extraction when comment text is empty * Option `--windows-filenames` to force use of windows compatible filenames * [ExtractAudio] Bugfix * Don't raise `parser.error` when exiting for update * [MoveFiles] Fix for when merger can't run * Changed `--trim-file-name` to `--trim-filenames` to be similar to related options * Format Sort improvements: * Prefer `vp9.2` more than other `vp9` codecs * Remove forced priority of `quality` * Remove unnecessary `field_preference` and misuse of `preference` from extractors * Build improvements: * Fix hash output by [shirt](https://github.com/shirt-dev) * Lock python package versions for x86 and use `wheels` by [shirt](https://github.com/shirt-dev) * Exclude `vcruntime140.dll` from UPX by [jbruchon](https://github.com/jbruchon) * Set version number based on UTC time, not local time * Publish on PyPi only if token is set * [docs] Better document `--prefer-free-formats` and add `--no-prefer-free-format` ### 2021.02.15 * Merge youtube-dl: Upto [2021.02.10](https://github.com/ytdl-org/youtube-dl/releases/tag/2021.02.10) (except archive.org) * [niconico] Improved extraction and support encrypted/SMILE movies by [kurumigi](https://github.com/kurumigi), [tsukumijima](https://github.com/tsukumijima), [bbepis](https://github.com/bbepis), [pukkandan](https://github.com/pukkandan) * Fix HLS AES-128 with multiple keys in external downloaders by [shirt](https://github.com/shirt-dev) * [youtube_live_chat] Fix by using POST API by [siikamiika](https://github.com/siikamiika) * [rumble] Add support for video page * Option `--allow-unplayable-formats` to allow downloading unplayable video formats * [ExtractAudio] Don't re-encode when file is already in a common audio format * [youtube] Fix search continuations * [youtube] Fix for new accounts * Improve build/updater: by [pukkandan](https://github.com/pukkandan) and [shirt](https://github.com/shirt-dev) * Fix SHA256 calculation in build and implement hash checking for updater * Exit immediately in windows once the update process starts * Fix updater for `x86.exe` * Updater looks for both `yt-dlp` and `youtube-dlc` in releases for future-proofing * Change optional dependency to `pycryptodome` * Fix issue with unicode filenames in aria2c by [shirt](https://github.com/shirt-dev) * Fix `allow_playlist_files` not being correctly passed through * Fix for empty HTTP head requests by [shirt](https://github.com/shirt-dev) * Fix `get_executable_path` in UNIX * [sponskrub] Print ffmpeg output and errors to terminal * `__real_download` should be false when ffmpeg unavailable and no download * Show `exe`/`zip`/`source` and 32/64bit in verbose message ### 2021.02.09 * **aria2c support for DASH/HLS**: by [shirt](https://github.com/shirt-dev) * **Implement Updater** (`-U`) by [shirt](https://github.com/shirt-dev) * [youtube] Fix comment extraction * [youtube_live_chat] Improve extraction * [youtube] Fix for channel URLs sometimes not downloading all pages * [aria2c] Changed default arguments to `--console-log-level=warn --summary-interval=0 --file-allocation=none -x16 -j16 -s16` * Add fallback for thumbnails * [embedthumbnail] Keep original thumbnail after conversion if write_thumbnail given * [embedsubtitle] Keep original subtitle after conversion if write_subtitles given * [pyinst.py] Move back to root dir * [youtube] Simplified renderer parsing and bugfixes * [movefiles] Fix compatibility with python2 * [remuxvideo] Fix validation of conditional remux * [sponskrub] Don't raise error when the video does not exist * [docs] Crypto is an optional dependency ### 2021.02.04 * Merge youtube-dl: Upto [2021.02.04.1](https://github.com/ytdl-org/youtube-dl/releases/tag/2021.02.04.1) * **Date/time formatting in output template:** * You can use [`strftime`](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) to format date/time fields. Example: `%(upload_date>%Y-%m-%d)s` * **Multiple output templates:** * Separate output templates can be given for the different metadata files by using `-o TYPE:TEMPLATE` * The allowed types are: `subtitle|thumbnail|description|annotation|infojson|pl_description|pl_infojson` * [youtube] More metadata extraction for channel/playlist URLs (channel, uploader, thumbnail, tags) * New option `--no-write-playlist-metafiles` to prevent writing playlist metadata files * [audius] Fix extractor * [youtube_live_chat] Fix `parse_yt_initial_data` and add `fragment_retries` * [postprocessor] Raise errors correctly * [metadatafromtitle] Fix bug when extracting data from numeric fields * Fix issue with overwriting files * Fix "Default format spec" appearing in quiet mode * [FormatSort] Allow user to prefer av01 over vp9 (The default is still vp9) * [FormatSort] fix bug where `quality` had more priority than `hasvid` * [pyinst] Automatically detect python architecture and working directory * Strip out internal fields such as `_filename` from infojson ### 2021.01.29 * **Features from [animelover1984/youtube-dl](https://github.com/animelover1984/youtube-dl)**: by [animelover1984](https://github.com/animelover1984) and [bbepis](https://github.com/bbepis) * Add `--get-comments` * [youtube] Extract comments * [billibilli] Added BiliBiliSearchIE, BilibiliChannelIE * [billibilli] Extract comments * [billibilli] Better video extraction * Write playlist data to infojson * [FFmpegMetadata] Embed infojson inside the video * [EmbedThumbnail] Try embedding in mp4 using ffprobe and `-disposition` * [EmbedThumbnail] Treat mka like mkv and mov like mp4 * [EmbedThumbnail] Embed in ogg/opus * [VideoRemuxer] Conditionally remux video * [VideoRemuxer] Add `-movflags +faststart` when remuxing to mp4 * [ffmpeg] Print entire stderr in verbose when there is error * [EmbedSubtitle] Warn when embedding ass in mp4 * [anvato] Use NFLTokenGenerator if possible * **Parse additional metadata**: New option `--parse-metadata` to extract additional metadata from existing fields * The extracted fields can be used in `--output` * Deprecated `--metadata-from-title` * [Audius] Add extractor * [youtube] Extract playlist description and write it to `.description` file * Detect existing files even when using `recode`/`remux` (`extract-audio` is partially fixed) * Fix wrong user config from v2021.01.24 * [youtube] Report error message from youtube as error instead of warning * [FormatSort] Fix some fields not sorting from v2021.01.24 * [postprocessor] Deprecate `avconv`/`avprobe`. All current functionality is left untouched. But don't expect any new features to work with avconv * [postprocessor] fix `write_debug` to not throw error when there is no `_downloader` * [movefiles] Don't give "cant find" warning when move is unnecessary * Refactor `update-version`, `pyinst.py` and related files * [ffmpeg] Document more formats that are supported for remux/recode ### 2021.01.24 * Merge youtube-dl: Upto [2021.01.24](https://github.com/ytdl-org/youtube-dl/releases/tag/2021.01.16) * Plugin support ([documentation](https://github.com/yt-dlp/yt-dlp#plugins)) * **Multiple paths**: New option `-P`/`--paths` to give different paths for different types of files * The syntax is `-P "type:path" -P "type:path"` * Valid types are: home, temp, description, annotation, subtitle, infojson, thumbnail * Additionally, configuration file is taken from home directory or current directory * Allow passing different arguments to different external downloaders * [mildom] Add extractor by [nao20010128nao](https://github.com/nao20010128nao) * Warn when using old style `--external-downloader-args` and `--post-processor-args` * Fix `--no-overwrite` when using `--write-link` * [sponskrub] Output `unrecognized argument` error message correctly * [cbs] Make failure to extract title non-fatal * Fix typecasting when pre-checking archive * Fix issue with setting title on UNIX * Deprecate redundant aliases in `formatSort`. The aliases remain functional for backward compatibility, but will be left undocumented * [tests] Fix test_post_hooks * [tests] Split core and download tests ### 2021.01.20 * [TrovoLive] Add extractor (only VODs) * [pokemon] Add `/#/player` URLs * Improved parsing of multiple postprocessor-args, add `--ppa` as alias * [EmbedThumbnail] Simplify embedding in mkv * [sponskrub] Encode filenames correctly, better debug output and error message * [readme] Cleanup options ### 2021.01.16 * Merge youtube-dl: Upto [2021.01.16](https://github.com/ytdl-org/youtube-dl/releases/tag/2021.01.16) * **Configuration files:** * Portable configuration file: `./yt-dlp.conf` * Allow the configuration files to be named `yt-dlp` instead of `youtube-dlc`. See [this](https://github.com/yt-dlp/yt-dlp#configuration) for details * Add PyPI release ### 2021.01.14 * Added option `--break-on-reject` * [roosterteeth.com] Fix for bonus episodes by [Zocker1999NET](https://github.com/Zocker1999NET) * [tiktok] Fix for when share_info is empty * [EmbedThumbnail] Fix bug due to incorrect function name * [docs] Changed sponskrub links to point to [yt-dlp/SponSkrub](https://github.com/yt-dlp/SponSkrub) since I am now providing both linux and windows releases * [docs] Change all links to correctly point to new fork URL * [docs] Fixes typos ### 2021.01.12 * [roosterteeth.com] Add subtitle support by [samiksome](https://github.com/samiksome) * Added `--force-overwrites`, `--no-force-overwrites` by [alxnull](https://github.com/alxnull) * Changed fork name to `yt-dlp` * Fix typos by [FelixFrog](https://github.com/FelixFrog) * [ci] Option to skip * [changelog] Added unreleased changes in blackjack4494/yt-dlc ### 2021.01.10 * [archive.org] Fix extractor and add support for audio and playlists by [wporr](https://github.com/wporr) * [Animelab] Added by [mariuszskon](https://github.com/mariuszskon) * [youtube:search] Fix view_count by [ohnonot](https://github.com/ohnonot) * [youtube] Show if video is embeddable in info (`playable_in_embed`) * Update version badge automatically in README * Enable `test_youtube_search_matching` * Create `to_screen` and similar functions in postprocessor/common ### 2021.01.09 * [youtube] Fix bug in automatic caption extraction * Add `post_hooks` to YoutubeDL by [alexmerkel](https://github.com/alexmerkel) * Batch file enumeration improvements by [glenn-slayden](https://github.com/glenn-slayden) * Stop immediately when reaching `--max-downloads` by [glenn-slayden](https://github.com/glenn-slayden) * Fix incorrect ANSI sequence for restoring console-window title by [glenn-slayden](https://github.com/glenn-slayden) * Kill child processes when yt-dlc is killed by [Unrud](https://github.com/Unrud) ### 2021.01.08 * Merge youtube-dl: Upto [2021.01.08](https://github.com/ytdl-org/youtube-dl/releases/tag/2021.01.08) except stitcher ([1](https://github.com/ytdl-org/youtube-dl/commit/bb38a1215718cdf36d73ff0a7830a64cd9fa37cc), [2](https://github.com/ytdl-org/youtube-dl/commit/a563c97c5cddf55f8989ed7ea8314ef78e30107f)) * Moved changelog to separate file ### 2021.01.07-1 * [Akamai] fix by [nixxo](https://github.com/nixxo) * [Tiktok] merge youtube-dl tiktok extractor by [GreyAlien502](https://github.com/GreyAlien502) * [vlive] add support for playlists by [kyuyeunk](https://github.com/kyuyeunk) * [youtube_live_chat] make sure playerOffsetMs is positive by [siikamiika](https://github.com/siikamiika) * Ignore extra data streams in ffmpeg by [jbruchon](https://github.com/jbruchon) * Allow passing different arguments to different postprocessors using `--postprocessor-args` * Deprecated `--sponskrub-args`. The same can now be done using `--postprocessor-args "sponskrub:<args>"` * [CI] Split tests into core-test and full-test ### 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 ### 2021.01.05-1 * **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.05 * **Format Sort:** Added `--format-sort` (`-S`), `--format-sort-force` (`--S-force`) - See [Sorting Formats](README.md#sorting-formats) for details * **Format Selection:** See [Format Selection](README.md#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](https://github.com/h-h-h-h) - See [Internet Shortcut Options](README.md#internet-shortcut-options) for details * **Sponskrub integration:** Added `--sponskrub`, `--sponskrub-cut`, `--sponskrub-force`, `--sponskrub-location`, `--sponskrub-args` - See [SponSkrub Options](README.md#sponskrub-sponsorblock-options) for details * Added `--force-download-archive` (`--force-write-archive`) by [h-h-h-h](https://github.com/h-h-h-h) * Added `--list-formats-as-table`, `--list-formats-old` * **Negative Options:** Makes it possible to negate most boolean options by adding a `no-` to the switch. Usefull when you want to reverse an option that is defined in a config file * 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](https://github.com/pauldubois98) ([ytdl-org/youtube-dl#21569](https://github.com/ytdl-org/youtube-dl/pull/21569)) * Make Twitch Video ID output from Playlist and VOD extractor same. This is only a temporary fix * Merge youtube-dl: Upto [2021.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 * Extractors [tiktok](https://github.com/ytdl-org/youtube-dl/commit/fb626c05867deab04425bad0c0b16b55473841a2) and [hotstar](https://github.com/ytdl-org/youtube-dl/commit/bb38a1215718cdf36d73ff0a7830a64cd9fa37cc) have not been merged * Cleaned up the fork for public use **Note**: All uncredited changes above this point are authored by [pukkandan](https://github.com/pukkandan) ### Unreleased changes in [blackjack4494/yt-dlc](https://github.com/blackjack4494/yt-dlc) * Updated to youtube-dl release 2020.11.26 by [pukkandan](https://github.com/pukkandan) * Youtube improvements by [pukkandan](https://github.com/pukkandan) * Implemented all Youtube Feeds (ytfav, ytwatchlater, ytsubs, ythistory, ytrec) and SearchURL * Fix some improper Youtube URLs * Redirect channel home to /video * Print youtube's warning message * Handle Multiple pages for feeds better * [youtube] Fix ytsearch not returning results sometimes due to promoted content by [coletdjnz](https://github.com/coletdjnz) * [youtube] Temporary fix for automatic captions - disable json3 by [blackjack4494](https://github.com/blackjack4494) * Add --break-on-existing by [gergesh](https://github.com/gergesh) * Pre-check video IDs in the archive before downloading by [pukkandan](https://github.com/pukkandan) * [bitwave.tv] New extractor by [lorpus](https://github.com/lorpus) * [Gedi] Add extractor by [nixxo](https://github.com/nixxo) * [Rcs] Add new extractor by [nixxo](https://github.com/nixxo) * [skyit] New skyitalia extractor by [nixxo](https://github.com/nixxo) * [france.tv] Fix thumbnail URL by [renalid](https://github.com/renalid) * [ina] support mobile links by [B0pol](https://github.com/B0pol) * [instagram] Fix thumbnail extractor by [nao20010128nao](https://github.com/nao20010128nao) * [SouthparkDe] Support for English URLs by [xypwn](https://github.com/xypwn) * [spreaker] fix SpreakerShowIE test URL by [pukkandan](https://github.com/pukkandan) * [Vlive] Fix playlist handling when downloading a channel by [kyuyeunk](https://github.com/kyuyeunk) * [tmz] Fix extractor by [diegorodriguezv](https://github.com/diegorodriguezv) * [ITV] BTCC URL update by [WolfganP](https://github.com/WolfganP) * [generic] Detect embedded bitchute videos by [pukkandan](https://github.com/pukkandan) * [generic] Extract embedded youtube and twitter videos by [diegorodriguezv](https://github.com/diegorodriguezv) * [ffmpeg] Ensure all streams are copied by [pukkandan](https://github.com/pukkandan) * [embedthumbnail] Fix for os.rename error by [pukkandan](https://github.com/pukkandan) * make_win.bat: don't use UPX to pack vcruntime140.dll by [jbruchon](https://github.com/jbruchon) ### Changelog of [blackjack4494/yt-dlc](https://github.com/blackjack4494/yt-dlc) till release 2020.11.11-3 **Note**: This was constructed from the merge commit messages and may not be entirely accurate * [bandcamp] fix failing test. remove subclass hack by [insaneracist](https://github.com/insaneracist) * [bandcamp] restore album downloads by [insaneracist](https://github.com/insaneracist) * [francetv] fix extractor by [Surkal](https://github.com/Surkal) * [gdcvault] fix extractor by [blackjack4494](https://github.com/blackjack4494) * [hotstar] Move to API v1 by [theincognito-inc](https://github.com/theincognito-inc) * [hrfernsehen] add extractor by [blocktrron](https://github.com/blocktrron) * [kakao] new apis by [blackjack4494](https://github.com/blackjack4494) * [la7] fix missing protocol by [nixxo](https://github.com/nixxo) * [mailru] removed escaped braces, use urljoin, added tests by [nixxo](https://github.com/nixxo) * [MTV/Nick] universal mgid extractor + fix nick.de feed by [blackjack4494](https://github.com/blackjack4494) * [mtv] Fix a missing match_id by [nixxo](https://github.com/nixxo) * [Mtv] updated extractor logic & more by [blackjack4494](https://github.com/blackjack4494) * [ndr] support Daserste ndr by [blackjack4494](https://github.com/blackjack4494) * [Netzkino] Only use video id to find metadata by [TobiX](https://github.com/TobiX) * [newgrounds] fix: video download by [insaneracist](https://github.com/insaneracist) * [nitter] Add new extractor by [B0pol](https://github.com/B0pol) * [soundcloud] Resolve audio/x-wav by [tfvlrue](https://github.com/tfvlrue) * [soundcloud] sets pattern and tests by [blackjack4494](https://github.com/blackjack4494) * [SouthparkDE/MTV] another mgid extraction (mtv_base) feed url updated by [blackjack4494](https://github.com/blackjack4494) * [StoryFire] Add new extractor by [sgstair](https://github.com/sgstair) * [twitch] by [geauxlo](https://github.com/geauxlo) * [videa] Adapt to updates by [adrianheine](https://github.com/adrianheine) * [Viki] subtitles, formats by [blackjack4494](https://github.com/blackjack4494) * [vlive] fix extractor for revamped website by [exwm](https://github.com/exwm) * [xtube] fix extractor by [insaneracist](https://github.com/insaneracist) * [youtube] Convert subs when download is skipped by [blackjack4494](https://github.com/blackjack4494) * [youtube] Fix age gate detection by [random-nick](https://github.com/random-nick) * [youtube] fix yt-only playback when age restricted/gated - requires cookies by [blackjack4494](https://github.com/blackjack4494) * [youtube] fix: extract artist metadata from ytInitialData by [insaneracist](https://github.com/insaneracist) * [youtube] fix: extract mix playlist ids from ytInitialData by [insaneracist](https://github.com/insaneracist) * [youtube] fix: mix playlist title by [insaneracist](https://github.com/insaneracist) * [youtube] fix: Youtube Music playlists by [insaneracist](https://github.com/insaneracist) * [Youtube] Fixed problem with new youtube player by [peet1993](https://github.com/peet1993) * [zoom] Fix url parsing for url's containing /share/ and dots by [Romern](https://github.com/Romern) * [zoom] new extractor by [insaneracist](https://github.com/insaneracist) * abc by [adrianheine](https://github.com/adrianheine) * Added Comcast_SSO fix by [merval](https://github.com/merval) * Added DRM logic to brightcove by [merval](https://github.com/merval) * Added regex for ABC.com site. by [kucksdorfs](https://github.com/kucksdorfs) * alura by [hugohaa](https://github.com/hugohaa) * Arbitrary merges by [fstirlitz](https://github.com/fstirlitz) * ard.py_add_playlist_support by [martin54](https://github.com/martin54) * Bugfix/youtube/chapters fix extractor by [gschizas](https://github.com/gschizas) * bugfix_youtube_like_extraction by [RedpointsBots](https://github.com/RedpointsBots) * Create build workflow by [blackjack4494](https://github.com/blackjack4494) * deezer by [LucBerge](https://github.com/LucBerge) * Detect embedded bitchute videos by [pukkandan](https://github.com/pukkandan) * Don't install tests by [l29ah](https://github.com/l29ah) * Don't try to embed/convert json subtitles generated by [youtube](https://github.com/youtube) livechat by [pukkandan](https://github.com/pukkandan) * Doodstream by [sxvghd](https://github.com/sxvghd) * duboku by [lkho](https://github.com/lkho) * elonet by [tpikonen](https://github.com/tpikonen) * ext/remuxe-video by [Zocker1999NET](https://github.com/Zocker1999NET) * fall-back to the old way to fetch subtitles, if needed by [RobinD42](https://github.com/RobinD42) * feature_subscriber_count by [RedpointsBots](https://github.com/RedpointsBots) * Fix external downloader when there is no http_header by [pukkandan](https://github.com/pukkandan) * Fix issue triggered by [tubeup](https://github.com/tubeup) by [nsapa](https://github.com/nsapa) * Fix YoutubePlaylistsIE by [ZenulAbidin](https://github.com/ZenulAbidin) * fix-mitele' by [DjMoren](https://github.com/DjMoren) * fix/google-drive-cookie-issue by [legraphista](https://github.com/legraphista) * fix_tiktok by [mervel-mervel](https://github.com/mervel-mervel) * Fixed problem with JS player URL by [peet1993](https://github.com/peet1993) * fixYTSearch by [xarantolus](https://github.com/xarantolus) * FliegendeWurst-3sat-zdf-merger-bugfix-feature * gilou-bandcamp_update * implement ThisVid extractor by [rigstot](https://github.com/rigstot) * JensTimmerman-patch-1 by [JensTimmerman](https://github.com/JensTimmerman) * Keep download archive in memory for better performance by [jbruchon](https://github.com/jbruchon) * la7-fix by [iamleot](https://github.com/iamleot) * magenta by [adrianheine](https://github.com/adrianheine) * Merge 26564 from [adrianheine](https://github.com/adrianheine) * Merge code from [ddland](https://github.com/ddland) * Merge code from [nixxo](https://github.com/nixxo) * Merge code from [ssaqua](https://github.com/ssaqua) * Merge code from [zubearc](https://github.com/zubearc) * mkvthumbnail by [MrDoritos](https://github.com/MrDoritos) * myvideo_ge by [fonkap](https://github.com/fonkap) * naver by [SeonjaeHyeon](https://github.com/SeonjaeHyeon) * ondemandkorea by [julien-hadleyjack](https://github.com/julien-hadleyjack) * rai-update by [iamleot](https://github.com/iamleot) * RFC: youtube: Polymer UI and JSON endpoints for playlists by [wlritchi](https://github.com/wlritchi) * rutv by [adrianheine](https://github.com/adrianheine) * Sc extractor web auth by [blackjack4494](https://github.com/blackjack4494) * Switch from binary search tree to Python sets by [jbruchon](https://github.com/jbruchon) * tiktok by [skyme5](https://github.com/skyme5) * tvnow by [TinyToweringTree](https://github.com/TinyToweringTree) * twitch-fix by [lel-amri](https://github.com/lel-amri) * Twitter shortener by [blackjack4494](https://github.com/blackjack4494) * Update README.md by [JensTimmerman](https://github.com/JensTimmerman) * Update to reflect website changes. by [amigatomte](https://github.com/amigatomte) * use webarchive to fix a dead link in README by [B0pol](https://github.com/B0pol) * Viki the second by [blackjack4494](https://github.com/blackjack4494) * wdr-subtitles by [mrtnmtth](https://github.com/mrtnmtth) * Webpfix by [alexmerkel](https://github.com/alexmerkel) * Youtube live chat by [siikamiika](https://github.com/siikamiika) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/Collaborators.md������������������������������������������������������������������0000664�0000000�0000000�00000004261�14224003362�0016451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Collaborators This is a list of the collaborators of the project and their major contributions. See the [Changelog](Changelog.md) for more details. You can also find lists of all [contributors of yt-dlp](CONTRIBUTORS) and [authors of youtube-dl](https://github.com/ytdl-org/youtube-dl/blob/master/AUTHORS) ## [pukkandan](https://github.com/pukkandan) [![ko-fi](https://img.shields.io/badge/_-Ko--fi-red.svg?logo=kofi&labelColor=555555&style=for-the-badge)](https://ko-fi.com/pukkandan) * Owner of the fork ## [shirt](https://github.com/shirt-dev) [![ko-fi](https://img.shields.io/badge/_-Ko--fi-red.svg?logo=kofi&labelColor=555555&style=for-the-badge)](https://ko-fi.com/shirt) * Multithreading (`-N`) and aria2c support for fragment downloads * Support for media initialization and discontinuity in HLS * The self-updater (`-U`) ## [coletdjnz](https://github.com/coletdjnz) [![gh-sponsor](https://img.shields.io/badge/_-Sponsor-red.svg?logo=githubsponsors&labelColor=555555&style=for-the-badge)](https://github.com/sponsors/coletdjnz) * YouTube improvements including: age-gate bypass, private playlists, multiple-clients (to avoid throttling) and a lot of under-the-hood improvements * Added support for downloading YoutubeWebArchive videos * Added support for new websites MainStreaming, PRX, nzherald, etc ## [Ashish0804](https://github.com/Ashish0804) [![ko-fi](https://img.shields.io/badge/_-Ko--fi-red.svg?logo=kofi&labelColor=555555&style=for-the-badge)](https://ko-fi.com/ashish0804) * Added support for new websites BiliIntl, DiscoveryPlusIndia, OlympicsReplay, PlanetMarathi, ShemarooMe, Utreon, Zee5 etc * Added playlist/series downloads for Hotstar, ParamountPlus, Rumble, SonyLIV, Trovo, TubiTv, Voot etc * Improved/fixed support for HiDive, HotStar, Hungama, LBRY, LinkedInLearning, Mxplayer, SonyLiv, TV2, Vimeo, VLive etc ## [Lesmiscore](https://github.com/Lesmiscore) (nao20010128nao) **Bitcoin**: bc1qfd02r007cutfdjwjmyy9w23rjvtls6ncve7r3s **Monacoin**: mona1q3tf7dzvshrhfe3md379xtvt2n22duhglv5dskr * Download live from start to end for YouTube * Added support for new websites mildom, PixivSketch, skeb, radiko, voicy, mirrativ, openrec, whowatch, damtomo, 17.live, mixch etc �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/LICENSE���������������������������������������������������������������������������0000664�0000000�0000000�00000002273�14224003362�0014327�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org/> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/MANIFEST.in�����������������������������������������������������������������������0000664�0000000�0000000�00000000333�14224003362�0015053�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include AUTHORS include Changelog.md include LICENSE include README.md include completions/*/* include supportedsites.md include yt-dlp.1 include requirements.txt recursive-include devscripts * recursive-include test * �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/Makefile��������������������������������������������������������������������������0000664�0000000�0000000�00000014151�14224003362�0014760�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������all: lazy-extractors yt-dlp doc pypi-files clean: clean-test clean-dist clean-all: clean clean-cache completions: completion-bash completion-fish completion-zsh doc: README.md CONTRIBUTING.md issuetemplates supportedsites ot: offlinetest tar: yt-dlp.tar.gz # Keep this list in sync with MANIFEST.in # intended use: when building a source distribution, # make pypi-files && python setup.py sdist pypi-files: AUTHORS Changelog.md LICENSE README.md README.txt supportedsites completions yt-dlp.1 devscripts/* test/* .PHONY: all clean install test tar pypi-files completions ot offlinetest codetest supportedsites clean-test: rm -rf test/testdata/sigs/player-*.js tmp/ *.annotations.xml *.aria2 *.description *.dump *.frag \ *.frag.aria2 *.frag.urls *.info.json *.live_chat.json *.meta *.part* *.tmp *.temp *.unknown_video *.ytdl \ *.3gp *.ape *.ass *.avi *.desktop *.flac *.flv *.jpeg *.jpg *.m4a *.m4v *.mhtml *.mkv *.mov *.mp3 \ *.mp4 *.ogg *.opus *.png *.sbv *.srt *.swf *.swp *.ttml *.url *.vtt *.wav *.webloc *.webm *.webp clean-dist: rm -rf yt-dlp.1.temp.md yt-dlp.1 README.txt MANIFEST build/ dist/ .coverage cover/ yt-dlp.tar.gz completions/ \ yt_dlp/extractor/lazy_extractors.py *.spec CONTRIBUTING.md.tmp yt-dlp yt-dlp.exe yt_dlp.egg-info/ AUTHORS .mailmap clean-cache: find . \( -name "*.pyc" -o -name "*.class" \) -delete completion-bash: completions/bash/yt-dlp completion-fish: completions/fish/yt-dlp.fish completion-zsh: completions/zsh/_yt-dlp lazy-extractors: yt_dlp/extractor/lazy_extractors.py PREFIX ?= /usr/local DESTDIR ?= . BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/man SHAREDIR ?= $(PREFIX)/share PYTHON ?= /usr/bin/env python3 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi) # set markdown input format to "markdown-smart" for pandoc version 2 and to "markdown" for pandoc prior to version 2 MARKDOWN = $(shell if [ `pandoc -v | head -n1 | cut -d" " -f2 | head -c1` = "2" ]; then echo markdown-smart; else echo markdown; fi) install: lazy-extractors yt-dlp yt-dlp.1 completions install -Dm755 yt-dlp $(DESTDIR)$(BINDIR)/yt-dlp install -Dm644 yt-dlp.1 $(DESTDIR)$(MANDIR)/man1/yt-dlp.1 install -Dm644 completions/bash/yt-dlp $(DESTDIR)$(SHAREDIR)/bash-completion/completions/yt-dlp install -Dm644 completions/zsh/_yt-dlp $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_yt-dlp install -Dm644 completions/fish/yt-dlp.fish $(DESTDIR)$(SHAREDIR)/fish/vendor_completions.d/yt-dlp.fish codetest: flake8 . test: $(PYTHON) -m pytest $(MAKE) codetest offlinetest: codetest $(PYTHON) -m pytest -k "not download" yt-dlp: yt_dlp/*.py yt_dlp/*/*.py mkdir -p zip for d in yt_dlp yt_dlp/downloader yt_dlp/extractor yt_dlp/postprocessor ; do \ mkdir -p zip/$$d ;\ cp -pPR $$d/*.py zip/$$d/ ;\ done touch -t 200001010101 zip/yt_dlp/*.py zip/yt_dlp/*/*.py mv zip/yt_dlp/__main__.py zip/ cd zip ; zip -q ../yt-dlp yt_dlp/*.py yt_dlp/*/*.py __main__.py rm -rf zip echo '#!$(PYTHON)' > yt-dlp cat yt-dlp.zip >> yt-dlp rm yt-dlp.zip chmod a+x yt-dlp README.md: yt_dlp/*.py yt_dlp/*/*.py COLUMNS=80 $(PYTHON) yt_dlp/__main__.py --help | $(PYTHON) devscripts/make_readme.py CONTRIBUTING.md: README.md $(PYTHON) devscripts/make_contributing.py README.md CONTRIBUTING.md issuetemplates: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.yml .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.yml .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.yml .github/ISSUE_TEMPLATE_tmpl/4_bug_report.yml .github/ISSUE_TEMPLATE_tmpl/5_feature_request.yml yt_dlp/version.py $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.yml .github/ISSUE_TEMPLATE/1_broken_site.yml $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.yml .github/ISSUE_TEMPLATE/2_site_support_request.yml $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.yml .github/ISSUE_TEMPLATE/3_site_feature_request.yml $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/4_bug_report.yml .github/ISSUE_TEMPLATE/4_bug_report.yml $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/5_feature_request.yml .github/ISSUE_TEMPLATE/5_feature_request.yml $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/6_question.yml .github/ISSUE_TEMPLATE/6_question.yml supportedsites: $(PYTHON) devscripts/make_supportedsites.py supportedsites.md README.txt: README.md pandoc -f $(MARKDOWN) -t plain README.md -o README.txt yt-dlp.1: README.md $(PYTHON) devscripts/prepare_manpage.py yt-dlp.1.temp.md pandoc -s -f $(MARKDOWN) -t man yt-dlp.1.temp.md -o yt-dlp.1 rm -f yt-dlp.1.temp.md completions/bash/yt-dlp: yt_dlp/*.py yt_dlp/*/*.py devscripts/bash-completion.in mkdir -p completions/bash $(PYTHON) devscripts/bash-completion.py completions/zsh/_yt-dlp: yt_dlp/*.py yt_dlp/*/*.py devscripts/zsh-completion.in mkdir -p completions/zsh $(PYTHON) devscripts/zsh-completion.py completions/fish/yt-dlp.fish: yt_dlp/*.py yt_dlp/*/*.py devscripts/fish-completion.in mkdir -p completions/fish $(PYTHON) devscripts/fish-completion.py _EXTRACTOR_FILES = $(shell find yt_dlp/extractor -iname '*.py' -and -not -iname 'lazy_extractors.py') yt_dlp/extractor/lazy_extractors.py: devscripts/make_lazy_extractors.py devscripts/lazy_load_template.py $(_EXTRACTOR_FILES) $(PYTHON) devscripts/make_lazy_extractors.py $@ yt-dlp.tar.gz: all @tar -czf $(DESTDIR)/yt-dlp.tar.gz --transform "s|^|yt-dlp/|" --owner 0 --group 0 \ --exclude '*.DS_Store' \ --exclude '*.kate-swp' \ --exclude '*.pyc' \ --exclude '*.pyo' \ --exclude '*~' \ --exclude '__pycache__' \ --exclude '.git' \ -- \ README.md supportedsites.md Changelog.md LICENSE \ CONTRIBUTING.md Collaborators.md CONTRIBUTORS AUTHORS \ Makefile MANIFEST.in yt-dlp.1 README.txt completions \ setup.py setup.cfg yt-dlp yt_dlp requirements.txt \ devscripts test tox.ini pytest.ini AUTHORS: .mailmap git shortlog -s -n | cut -f2 | sort > AUTHORS .mailmap: git shortlog -s -e -n | awk '!(out[$$NF]++) { $$1="";sub(/^[ \t]+/,""); print}' > .mailmap �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/README.md�������������������������������������������������������������������������0000664�0000000�0000000�00000411145�14224003362�0014603�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- MANPAGE: BEGIN EXCLUDED SECTION --> <div align="center"> [![YT-DLP](https://raw.githubusercontent.com/yt-dlp/yt-dlp/master/.github/banner.svg)](#readme) [![Release version](https://img.shields.io/github/v/release/yt-dlp/yt-dlp?color=brightgreen&label=Download&style=for-the-badge)](#release-files "Release") [![PyPi](https://img.shields.io/badge/-PyPi-blue.svg?logo=pypi&labelColor=555555&style=for-the-badge)](https://pypi.org/project/yt-dlp "PyPi") [![Donate](https://img.shields.io/badge/_-Donate-red.svg?logo=githubsponsors&labelColor=555555&style=for-the-badge)](Collaborators.md#collaborators "Donate") [![Matrix](https://img.shields.io/matrix/yt-dlp:matrix.org?color=brightgreen&labelColor=555555&label=&logo=element&style=for-the-badge)](https://matrix.to/#/#yt-dlp:matrix.org "Matrix") [![Discord](https://img.shields.io/discord/807245652072857610?color=blue&labelColor=555555&label=&logo=discord&style=for-the-badge)](https://discord.gg/H5MNcFW63r "Discord") [![Supported Sites](https://img.shields.io/badge/-Supported_Sites-brightgreen.svg?style=for-the-badge)](supportedsites.md "Supported Sites") [![License: Unlicense](https://img.shields.io/badge/-Unlicense-blue.svg?style=for-the-badge)](LICENSE "License") [![CI Status](https://img.shields.io/github/workflow/status/yt-dlp/yt-dlp/Core%20Tests/master?label=Tests&style=for-the-badge)](https://github.com/yt-dlp/yt-dlp/actions "CI Status") [![Commits](https://img.shields.io/github/commit-activity/m/yt-dlp/yt-dlp?label=commits&style=for-the-badge)](https://github.com/yt-dlp/yt-dlp/commits "Commit History") [![Last Commit](https://img.shields.io/github/last-commit/yt-dlp/yt-dlp/master?label=&style=for-the-badge)](https://github.com/yt-dlp/yt-dlp/commits "Commit History") </div> <!-- MANPAGE: END EXCLUDED SECTION --> yt-dlp is a [youtube-dl](https://github.com/ytdl-org/youtube-dl) fork based on the now inactive [youtube-dlc](https://github.com/blackjack4494/yt-dlc). The main focus of this project is adding new features and patches while also keeping up to date with the original project <!-- MANPAGE: MOVE "USAGE AND OPTIONS" SECTION HERE --> <!-- MANPAGE: BEGIN EXCLUDED SECTION --> * [NEW FEATURES](#new-features) * [Differences in default behavior](#differences-in-default-behavior) * [INSTALLATION](#installation) * [Update](#update) * [Release Files](#release-files) * [Dependencies](#dependencies) * [Compile](#compile) * [USAGE AND OPTIONS](#usage-and-options) * [General Options](#general-options) * [Network Options](#network-options) * [Geo-restriction](#geo-restriction) * [Video Selection](#video-selection) * [Download Options](#download-options) * [Filesystem Options](#filesystem-options) * [Thumbnail Options](#thumbnail-options) * [Internet Shortcut Options](#internet-shortcut-options) * [Verbosity and Simulation Options](#verbosity-and-simulation-options) * [Workarounds](#workarounds) * [Video Format Options](#video-format-options) * [Subtitle Options](#subtitle-options) * [Authentication Options](#authentication-options) * [Post-processing Options](#post-processing-options) * [SponsorBlock Options](#sponsorblock-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) * [Filtering Formats](#filtering-formats) * [Sorting Formats](#sorting-formats) * [Format Selection examples](#format-selection-examples) * [MODIFYING METADATA](#modifying-metadata) * [Modifying metadata examples](#modifying-metadata-examples) * [EXTRACTOR ARGUMENTS](#extractor-arguments) * [PLUGINS](#plugins) * [EMBEDDING YT-DLP](#embedding-yt-dlp) * [DEPRECATED OPTIONS](#deprecated-options) * [CONTRIBUTING](CONTRIBUTING.md#contributing-to-yt-dlp) * [Opening an Issue](CONTRIBUTING.md#opening-an-issue) * [Developer Instructions](CONTRIBUTING.md#developer-instructions) * [MORE](#more) <!-- MANPAGE: END EXCLUDED SECTION --> # NEW FEATURES * Based on **youtube-dl 2021.12.17 [commit/6508688](https://github.com/ytdl-org/youtube-dl/commit/6508688e88c83bb811653083db9351702cd39a6a)** ([exceptions](https://github.com/yt-dlp/yt-dlp/issues/21)) and **youtube-dlc 2020.11.11-3 [commit/f9401f2](https://github.com/blackjack4494/yt-dlc/commit/f9401f2a91987068139c5f757b12fc711d4c0cee)**: You get all the features and patches of [youtube-dlc](https://github.com/blackjack4494/yt-dlc) in addition to the latest [youtube-dl](https://github.com/ytdl-org/youtube-dl) * **[SponsorBlock Integration](#sponsorblock-options)**: You can mark/remove sponsor sections in youtube videos by utilizing the [SponsorBlock](https://sponsor.ajay.app) API * **[Format Sorting](#sorting-formats)**: The default format sorting options have been changed so that higher resolution and better codecs will be now preferred instead of simply using larger bitrate. Furthermore, you can now specify the sort order using `-S`. This allows for much easier format selection than what is possible by simply using `--format` ([examples](#format-selection-examples)) * **Merged with animelover1984/youtube-dl**: You get most of the features and improvements from [animelover1984/youtube-dl](https://github.com/animelover1984/youtube-dl) including `--write-comments`, `BiliBiliSearch`, `BilibiliChannel`, Embedding thumbnail in mp4/ogg/opus, playlist infojson etc. Note that the NicoNico livestreams are not available. See [#31](https://github.com/yt-dlp/yt-dlp/pull/31) for details. * **Youtube improvements**: * All Feeds (`:ytfav`, `:ytwatchlater`, `:ytsubs`, `:ythistory`, `:ytrec`) and private playlists supports downloading multiple pages of content * Search (`ytsearch:`, `ytsearchdate:`), search URLs and in-channel search works * Mixes supports downloading multiple pages of content * Some (but not all) age-gated content can be downloaded without cookies * Fix for [n-sig based throttling](https://github.com/ytdl-org/youtube-dl/issues/29326) * Redirect channel's home URL automatically to `/video` to preserve the old behaviour * `255kbps` audio is extracted (if available) from youtube music when premium cookies are given * Youtube music Albums, channels etc can be downloaded ([except self-uploaded music](https://github.com/yt-dlp/yt-dlp/issues/723)) * Download livestreams from the start using `--live-from-start` (experimental) * **Cookies from browser**: Cookies can be automatically extracted from all major web browsers using `--cookies-from-browser BROWSER[+KEYRING][:PROFILE]` * **Split video by chapters**: Videos can be split into multiple files based on chapters using `--split-chapters` * **Multi-threaded fragment downloads**: Download multiple fragments of m3u8/mpd videos in parallel. Use `--concurrent-fragments` (`-N`) option to set the number of threads used * **Aria2c with HLS/DASH**: You can use `aria2c` as the external downloader for DASH(mpd) and HLS(m3u8) formats * **New and fixed extractors**: Many new extractors have been added and a lot of existing ones have been fixed. See the [changelog](Changelog.md) or the [list of supported sites](supportedsites.md) * **New MSOs**: Philo, Spectrum, SlingTV, Cablevision, RCN * **Subtitle extraction from manifests**: Subtitles can be extracted from streaming media manifests. See [commit/be6202f](https://github.com/yt-dlp/yt-dlp/commit/be6202f12b97858b9d716e608394b51065d0419f) for details * **Multiple paths and output templates**: You can give different [output templates](#output-template) and download paths for different types of files. You can also set a temporary path where intermediary files are downloaded to using `--paths` (`-P`) * **Portable Configuration**: Configuration files are automatically loaded from the home and root directories. See [configuration](#configuration) for details * **Output template improvements**: Output templates can now have date-time formatting, numeric offsets, object traversal etc. See [output template](#output-template) for details. Even more advanced operations can also be done with the help of `--parse-metadata` and `--replace-in-metadata` * **Other new options**: Many new options have been added such as `--concat-playlist`, `--print`, `--wait-for-video`, `--sleep-requests`, `--convert-thumbnails`, `--write-link`, `--force-download-archive`, `--force-overwrites`, `--break-on-reject` etc * **Improvements**: Regex and other operators in `--format`/`--match-filter`, multiple `--postprocessor-args` and `--downloader-args`, faster archive checking, more [format selection options](#format-selection), merge multi-video/audio, multiple `--config-locations`, `--exec` at different stages, etc * **Plugins**: Extractors and PostProcessors can be loaded from an external file. See [plugins](#plugins) for details * **Self-updater**: The releases can be updated using `yt-dlp -U` See [changelog](Changelog.md) or [commits](https://github.com/yt-dlp/yt-dlp/commits) for the full list of changes ### Differences in default behavior Some of yt-dlp's default options are different from that of youtube-dl and youtube-dlc: * The options `--auto-number` (`-A`), `--title` (`-t`) and `--literal` (`-l`), no longer work. See [removed options](#Removed) for details * `avconv` is not supported as an alternative to `ffmpeg` * yt-dlp stores config files in slightly different locations to youtube-dl. See [configuration](#configuration) for a list of correct locations * The default [output template](#output-template) is `%(title)s [%(id)s].%(ext)s`. There is no real reason for this change. This was changed before yt-dlp was ever made public and now there are no plans to change it back to `%(title)s-%(id)s.%(ext)s`. Instead, you may use `--compat-options filename` * The default [format sorting](#sorting-formats) is different from youtube-dl and prefers higher resolution and better codecs rather than higher bitrates. You can use the `--format-sort` option to change this to any order you prefer, or use `--compat-options format-sort` to use youtube-dl's sorting order * The default format selector is `bv*+ba/b`. This means that if a combined video + audio format that is better than the best video-only format is found, the former will be preferred. Use `-f bv+ba/b` or `--compat-options format-spec` to revert this * Unlike youtube-dlc, yt-dlp does not allow merging multiple audio/video streams into one file by default (since this conflicts with the use of `-f bv*+ba`). If needed, this feature must be enabled using `--audio-multistreams` and `--video-multistreams`. You can also use `--compat-options multistreams` to enable both * `--no-abort-on-error` is enabled by default. Use `--abort-on-error` or `--compat-options abort-on-error` to abort on errors instead * When writing metadata files such as thumbnails, description or infojson, the same information (if available) is also written for playlists. Use `--no-write-playlist-metafiles` or `--compat-options no-playlist-metafiles` to not write these files * `--add-metadata` attaches the `infojson` to `mkv` files in addition to writing the metadata when used with `--write-info-json`. Use `--no-embed-info-json` or `--compat-options no-attach-info-json` to revert this * Some metadata are embedded into different fields when using `--add-metadata` as compared to youtube-dl. Most notably, `comment` field contains the `webpage_url` and `synopsis` contains the `description`. You can [use `--parse-metadata`](#modifying-metadata) to modify this to your liking or use `--compat-options embed-metadata` to revert this * `playlist_index` behaves differently when used with options like `--playlist-reverse` and `--playlist-items`. See [#302](https://github.com/yt-dlp/yt-dlp/issues/302) for details. You can use `--compat-options playlist-index` if you want to keep the earlier behavior * The output of `-F` is listed in a new format. Use `--compat-options list-formats` to revert this * All *experiences* of a funimation episode are considered as a single video. This behavior breaks existing archives. Use `--compat-options seperate-video-versions` to extract information from only the default player * Youtube live chat (if available) is considered as a subtitle. Use `--sub-langs all,-live_chat` to download all subtitles except live chat. You can also use `--compat-options no-live-chat` to prevent live chat from downloading * Youtube channel URLs are automatically redirected to `/video`. Append a `/featured` to the URL to download only the videos in the home page. If the channel does not have a videos tab, we try to download the equivalent `UU` playlist instead. For all other tabs, if the channel does not show the requested tab, an error will be raised. Also, `/live` URLs raise an error if there are no live videos instead of silently downloading the entire channel. You may use `--compat-options no-youtube-channel-redirect` to revert all these redirections * Unavailable videos are also listed for youtube playlists. Use `--compat-options no-youtube-unavailable-videos` to remove this * If `ffmpeg` is used as the downloader, the downloading and merging of formats happen in a single step when possible. Use `--compat-options no-direct-merge` to revert this * Thumbnail embedding in `mp4` is done with mutagen if possible. Use `--compat-options embed-thumbnail-atomicparsley` to force the use of AtomicParsley instead * Some private fields such as filenames are removed by default from the infojson. Use `--no-clean-infojson` or `--compat-options no-clean-infojson` to revert this * When `--embed-subs` and `--write-subs` are used together, the subtitles are written to disk and also embedded in the media file. You can use just `--embed-subs` to embed the subs and automatically delete the separate file. See [#630 (comment)](https://github.com/yt-dlp/yt-dlp/issues/630#issuecomment-893659460) for more info. `--compat-options no-keep-subs` can be used to revert this * `certifi` will be used for SSL root certificates, if installed. If you want to use system certificates (e.g. self-signed), use `--compat-options no-certifi` * youtube-dl tries to remove some superfluous punctuations from filenames. While this can sometimes be helpfull, it is often undesirable. So yt-dlp tries to keep the fields in the filenames as close to their original values as possible. You can use `--compat-options filename-sanitization` to revert to youtube-dl's behavior For ease of use, a few more compat options are available: * `--compat-options all`: Use all compat options * `--compat-options youtube-dl`: Same as `--compat-options all,-multistreams` * `--compat-options youtube-dlc`: Same as `--compat-options all,-no-live-chat,-no-youtube-channel-redirect` # INSTALLATION You can install yt-dlp using one of the following methods: ### Using the release binary You can simply download the [correct binary file](#release-files) for your OS <!-- MANPAGE: BEGIN EXCLUDED SECTION --> [![Windows](https://img.shields.io/badge/-Windows_x64-blue.svg?style=for-the-badge&logo=windows)](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe) [![Linux](https://img.shields.io/badge/-Linux/MacOS/BSD-red.svg?style=for-the-badge&logo=linux)](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp) [![Source Tarball](https://img.shields.io/badge/-Source_tar-green.svg?style=for-the-badge)](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.tar.gz) [![Other variants](https://img.shields.io/badge/-Other-grey.svg?style=for-the-badge)](#release-files) [![ALl versions](https://img.shields.io/badge/-All_Versions-lightgrey.svg?style=for-the-badge)](https://github.com/yt-dlp/yt-dlp/releases) <!-- MANPAGE: END EXCLUDED SECTION --> Note: The manpages, shell completion files etc. are available in the [source tarball](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.tar.gz) <!-- TODO: Move to Wiki --> In UNIX-like OSes (MacOS, Linux, BSD), you can also install the same in one of the following ways: ``` sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp ``` ``` sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp ``` ``` sudo aria2c https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp --dir /usr/local/bin -o yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp ``` ### With [PIP](https://pypi.org/project/pip) You can install the [PyPI package](https://pypi.org/project/yt-dlp) with: ``` python3 -m pip install -U yt-dlp ``` You can install without any of the optional dependencies using: ``` python3 -m pip install --no-deps -U yt-dlp ``` If you want to be on the cutting edge, you can also install the master branch with: ``` python3 -m pip install --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz ``` Note that on some systems, you may need to use `py` or `python` instead of `python3` <!-- TODO: Add to Wiki, Remove Taps --> ### With [Homebrew](https://brew.sh) macOS or Linux users that are using Homebrew can also install it by: ``` brew install yt-dlp/taps/yt-dlp ``` ## UPDATE You can use `yt-dlp -U` to update if you are [using the provided release](#using-the-release-binary) If you [installed with pip](#with-pip), simply re-run the same command that was used to install the program If you [installed using Homebrew](#with-homebrew), run `brew upgrade yt-dlp/taps/yt-dlp` <!-- MANPAGE: BEGIN EXCLUDED SECTION --> ## RELEASE FILES #### Recommended File|Description :---|:--- [yt-dlp](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp)|Platform-independant binary. Needs Python (recommended for **Linux/BSD**) [yt-dlp.exe](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe)|Windows (Win7 SP1+) standalone x64 binary (recommended for **Windows**) [yt-dlp_macos](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos)|MacOS (10.15+) standalone executable (recommended for **MacOS**) #### Alternatives File|Description :---|:--- [yt-dlp_x86.exe](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_x86.exe)|Windows (Vista SP2+) standalone x86 (32-bit) binary [yt-dlp_min.exe](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_min.exe)|Windows (Win7 SP1+) standalone x64 binary built with `py2exe`.<br/> Does not contain `pycryptodomex`, needs VC++14 [yt-dlp_win.zip](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_win.zip)|Unpackaged Windows executable (no auto-update) [yt-dlp_macos.zip](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos.zip)|Unpackaged MacOS (10.15+) executable (no auto-update) #### Misc File|Description :---|:--- [yt-dlp.tar.gz](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.tar.gz)|Source tarball. Also contains manpages, completions, etc [SHA2-512SUMS](https://github.com/yt-dlp/yt-dlp/releases/latest/download/SHA2-512SUMS)|GNU-style SHA512 sums [SHA2-256SUMS](https://github.com/yt-dlp/yt-dlp/releases/latest/download/SHA2-256SUMS)|GNU-style SHA256 sums <!-- MANPAGE: END EXCLUDED SECTION --> ## DEPENDENCIES Python versions 3.6+ (CPython and PyPy) are supported. Other versions and implementations may or may not work correctly. <!-- Python 3.5+ uses VC++14 and it is already embedded in the binary created <!x-- https://www.microsoft.com/en-us/download/details.aspx?id=26999 --x> On windows, [Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)](https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe) is also necessary to run yt-dlp. You probably already have this, but if the executable throws an error due to missing `MSVCR100.dll` you need to install it manually. --> While all the other dependencies are optional, `ffmpeg` and `ffprobe` are highly recommended * [**ffmpeg** and **ffprobe**](https://www.ffmpeg.org) - Required for [merging separate video and audio files](#format-selection) as well as for various [post-processing](#post-processing-options) tasks. License [depends on the build](https://www.ffmpeg.org/legal.html) * [**mutagen**](https://github.com/quodlibet/mutagen)\* - For embedding thumbnail in certain formats. Licensed under [GPLv2+](https://github.com/quodlibet/mutagen/blob/master/COPYING) * [**pycryptodomex**](https://github.com/Legrandin/pycryptodome)\* - For decrypting AES-128 HLS streams and various other data. Licensed under [BSD-2-Clause](https://github.com/Legrandin/pycryptodome/blob/master/LICENSE.rst) * [**websockets**](https://github.com/aaugustin/websockets)\* - For downloading over websocket. Licensed under [BSD-3-Clause](https://github.com/aaugustin/websockets/blob/main/LICENSE) * [**secretstorage**](https://github.com/mitya57/secretstorage)\* - For accessing the Gnome keyring while decrypting cookies of Chromium-based browsers on Linux. Licensed under [BSD-3-Clause](https://github.com/mitya57/secretstorage/blob/master/LICENSE) * [**brotli**](https://github.com/google/brotli)\* or [**brotlicffi**](https://github.com/python-hyper/brotlicffi) - [Brotli](https://en.wikipedia.org/wiki/Brotli) content encoding support. Both licensed under MIT <sup>[1](https://github.com/google/brotli/blob/master/LICENSE) [2](https://github.com/python-hyper/brotlicffi/blob/master/LICENSE) </sup> * [**certifi**](https://github.com/certifi/python-certifi)\* - Provides Mozilla's root certificate bundle. Licensed under [MPLv2](https://github.com/certifi/python-certifi/blob/master/LICENSE) * [**AtomicParsley**](https://github.com/wez/atomicparsley) - For embedding thumbnail in mp4/m4a if mutagen/ffmpeg cannot. Licensed under [GPLv2+](https://github.com/wez/atomicparsley/blob/master/COPYING) * [**rtmpdump**](http://rtmpdump.mplayerhq.hu) - For downloading `rtmp` streams. ffmpeg will be used as a fallback. Licensed under [GPLv2+](http://rtmpdump.mplayerhq.hu) * [**mplayer**](http://mplayerhq.hu/design7/info.html) or [**mpv**](https://mpv.io) - For downloading `rstp` streams. ffmpeg will be used as a fallback. Licensed under [GPLv2+](https://github.com/mpv-player/mpv/blob/master/Copyright) * [**phantomjs**](https://github.com/ariya/phantomjs) - Used in extractors where javascript needs to be run. Licensed under [BSD-3-Clause](https://github.com/ariya/phantomjs/blob/master/LICENSE.BSD) * [**sponskrub**](https://github.com/faissaloo/SponSkrub) - For using the now **deprecated** [sponskrub options](#sponskrub-options). Licensed under [GPLv3+](https://github.com/faissaloo/SponSkrub/blob/master/LICENCE.md) * Any external downloader that you want to use with `--downloader` To use or redistribute the dependencies, you must agree to their respective licensing terms. The Windows and MacOS standalone release binaries are already built with the python interpreter and all optional python packages (marked with \*) included. <!-- TODO: ffmpeg has merged this patch. Remove this note once there is new release --> **Note**: There are some regressions in newer ffmpeg versions that causes various issues when used alongside yt-dlp. Since ffmpeg is such an important dependency, we provide [custom builds](https://github.com/yt-dlp/FFmpeg-Builds#ffmpeg-static-auto-builds) with patches for these issues at [yt-dlp/FFmpeg-Builds](https://github.com/yt-dlp/FFmpeg-Builds). See [the readme](https://github.com/yt-dlp/FFmpeg-Builds#patches-applied) for details on the specific issues solved by these builds ## COMPILE **For Windows**: To build the Windows executable, you must have pyinstaller (and any of yt-dlp's optional dependencies if needed). Once you have all the necessary dependencies installed, (optionally) build lazy extractors using `devscripts/make_lazy_extractors.py`, and then just run `pyinst.py`. The executable will be built for the same architecture (32/64 bit) as the python used to build it. py -m pip install -U pyinstaller -r requirements.txt py devscripts/make_lazy_extractors.py py pyinst.py Note that pyinstaller [does not support](https://github.com/pyinstaller/pyinstaller#requirements-and-tested-platforms) Python installed from the Windows store without using a virtual environment **For Unix**: You will need the required build tools: `python`, `make` (GNU), `pandoc`, `zip`, `pytest` Then simply run `make`. You can also run `make yt-dlp` instead to compile only the binary without updating any of the additional files **Note**: In either platform, `devscripts/update-version.py` can be used to automatically update the version number You can also fork the project on github and run your fork's [build workflow](.github/workflows/build.yml) to automatically build a release # USAGE AND OPTIONS <!-- MANPAGE: BEGIN EXCLUDED SECTION --> yt-dlp [OPTIONS] [--] URL [URL...] `Ctrl+F` is your friend :D <!-- MANPAGE: END EXCLUDED SECTION --> <!-- Auto generated --> ## 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) -i, --ignore-errors Ignore download and postprocessing errors. The download will be considered successful even if the postprocessing fails --no-abort-on-error Continue with next video on download errors; e.g. to skip unavailable videos in a playlist (default) --abort-on-error Abort downloading of further videos if an error occurs (Alias: --no-ignore-errors) --dump-user-agent Display the current user-agent and exit --list-extractors List all supported extractors and exit --extractor-descriptions Output descriptions of all supported extractors and exit --force-generic-extractor Force extraction to use the generic extractor --default-search PREFIX Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for the search term "large apple". Use the value "auto" to let yt-dlp 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 Don't load any more configuration files except those given by --config-locations. For backward compatibility, if this option is found inside the system configuration file, the user configuration is not loaded. (Alias: --no-config) --no-config-locations Do not load any custom configuration files (default). When given inside a configuration file, ignore all previous --config-locations defined in the current file --config-locations PATH Location of the main configuration file; either the path to the config or its containing directory. Can be used multiple times and inside other configuration files --flat-playlist Do not extract the videos of a playlist, only list them --no-flat-playlist Extract the videos of a playlist --live-from-start Download livestreams from the start. Currently only supported for YouTube (Experimental) --no-live-from-start Download livestreams from the current time (default) --wait-for-video MIN[-MAX] Wait for scheduled streams to become available. Pass the minimum number of seconds (or range) to wait between retries --no-wait-for-video Do not wait for scheduled streams (default) --mark-watched Mark videos watched (even with --simulate) --no-mark-watched Do not mark videos watched (default) --no-colors Do not emit color codes in output --compat-options OPTS Options that can help keep compatibility with youtube-dl or youtube-dlc configurations by reverting some of the changes made in yt-dlp. See "Differences in default behavior" for details ## Network Options: --proxy URL Use the specified HTTP/HTTPS/SOCKS proxy. To enable SOCKS proxy, specify a proper scheme. For example socks5://user:pass@127.0.0.1:1080/. Pass in an empty string (--proxy "") for direct connection --socket-timeout SECONDS Time to wait before giving up, in seconds --source-address IP Client-side IP address to bind to -4, --force-ipv4 Make all connections via IPv4 -6, --force-ipv6 Make all connections via IPv6 ## Geo-restriction: --geo-verification-proxy URL Use this proxy to verify the IP address for some geo-restricted sites. The default proxy specified by --proxy (or none, if the option is not present) is used for the actual downloading --geo-bypass Bypass geographic restriction via faking X-Forwarded-For HTTP header (default) --no-geo-bypass Do not bypass geographic restriction via faking X-Forwarded-For HTTP header --geo-bypass-country CODE Force bypass geographic restriction with explicitly provided two-letter ISO 3166-2 country code --geo-bypass-ip-block IP_BLOCK Force bypass geographic restriction with explicitly provided IP block in CIDR notation ## Video Selection: --playlist-start NUMBER Playlist video to start at (default is 1) --playlist-end NUMBER Playlist video to end at (default is last) --playlist-items ITEM_SPEC Playlist video items to download. Specify indices of the videos in the playlist separated by commas like: "--playlist-items 1,2,5,8" if you want to download videos indexed 1, 2, 5, 8 in the playlist. You can specify range: "--playlist-items 1-3,7,10-13", it will download the videos at index 1, 2, 3, 7, 10, 11, 12 and 13 --min-filesize SIZE Do not download any videos smaller than 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 on 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. The date formats accepted is the same as --date --dateafter DATE Download only videos uploaded on or after this date. The date formats accepted is the same as --date --match-filters FILTER Generic video filter. Any field (see "OUTPUT TEMPLATE") can be compared with a number or a string using the operators defined in "Filtering formats". You can also simply specify a field to match if the field is present, use "!field" to check if the field is not present, and "&" to check multiple conditions. Use a "\" to escape "&" or quotes if needed. If used multiple times, the filter matches if atleast one of the conditions are met. Eg: --match-filter !is_live --match-filter "like_count>?100 & description~='(?i)\bcats \& dogs\b'" matches only videos that are not live OR those that have a like count more than 100 (or the like field is not available) and also has a description that contains the phrase "cats & dogs" (ignoring case) --no-match-filter Do not use generic video filter (default) --no-playlist Download only the video, if the URL refers to a video and a playlist --yes-playlist Download the playlist, if the URL refers to a video and a playlist --age-limit YEARS Download only videos suitable for the given age --download-archive FILE Download only videos not listed in the archive file. Record the IDs of all downloaded videos in it --no-download-archive Do not use archive file (default) --max-downloads NUMBER Abort after downloading NUMBER files --break-on-existing Stop the download process when encountering a file that is in the archive --break-on-reject Stop the download process when encountering a file that has been filtered out --break-per-input Make --break-on-existing and --break-on- reject act only on the current input URL --no-break-per-input --break-on-existing and --break-on-reject terminates the entire download queue --skip-playlist-after-errors N Number of allowed failures until the rest of the playlist is skipped ## Download Options: -N, --concurrent-fragments N Number of fragments of a dash/hlsnative video that should be downloaded concurrently (default is 1) -r, --limit-rate RATE Maximum download rate in bytes per second (e.g. 50K or 4.2M) --throttled-rate RATE Minimum download rate in bytes per second below which throttling is assumed and the video data is re-extracted (e.g. 100K) -R, --retries RETRIES Number of retries (default is 10), or "infinite" --file-access-retries RETRIES Number of times to retry on file access error (default is 10), or "infinite" --fragment-retries RETRIES Number of retries for a fragment (default is 10), or "infinite" (DASH, hlsnative and ISM) --skip-unavailable-fragments Skip unavailable fragments for DASH, hlsnative and ISM (default) (Alias: --no-abort-on-unavailable-fragment) --abort-on-unavailable-fragment Abort downloading if a fragment is unavailable (Alias: --no-skip-unavailable-fragments) --keep-fragments Keep downloaded fragments on disk after downloading is finished --no-keep-fragments Delete downloaded fragments after downloading is finished (default) --buffer-size SIZE Size of download buffer (e.g. 1024 or 16K) (default is 1024) --resize-buffer The buffer size is automatically resized from an initial value of --buffer-size (default) --no-resize-buffer Do not automatically adjust the buffer size --http-chunk-size SIZE Size of a chunk for chunk-based HTTP downloading (e.g. 10485760 or 10M) (default is disabled). May be useful for bypassing bandwidth throttling imposed by a webserver (experimental) --playlist-reverse Download playlist videos in reverse order --no-playlist-reverse Download playlist videos in default order (default) --playlist-random Download playlist videos in random order --xattr-set-filesize Set file xattribute ytdl.filesize with expected file size --hls-use-mpegts Use the mpegts container for HLS videos; allowing some players to play the video while downloading, and reducing the chance of file corruption if download is interrupted. This is enabled by default for live streams --no-hls-use-mpegts Do not use the mpegts container for HLS videos. This is default when not downloading live streams --downloader [PROTO:]NAME Name or path of the external downloader to use (optionally) prefixed by the protocols (http, ftp, m3u8, dash, rstp, rtmp, mms) to use it for. Currently supports native, aria2c, avconv, axel, curl, ffmpeg, httpie, wget (Recommended: aria2c). You can use this option multiple times to set different downloaders for different protocols. For example, --downloader aria2c --downloader "dash,m3u8:native" will use aria2c for http/ftp downloads, and the native downloader for dash/m3u8 downloads (Alias: --external-downloader) --downloader-args NAME:ARGS Give these arguments to the external downloader. Specify the downloader name and the arguments separated by a colon ":". For ffmpeg, arguments can be passed to different positions using the same syntax as --postprocessor-args. You can use this option multiple times to give different arguments to different downloaders (Alias: --external-downloader-args) ## Filesystem Options: -a, --batch-file FILE File containing URLs to download ("-" for stdin), one URL per line. Lines starting with "#", ";" or "]" are considered as comments and ignored --no-batch-file Do not read URLs from batch file (default) -P, --paths [TYPES:]PATH The paths where the files should be downloaded. Specify the type of file and the path separated by a colon ":". All the same TYPES as --output are supported. Additionally, you can also provide "home" (default) and "temp" paths. All intermediary files are first downloaded to the temp path and then the final files are moved over to the home path after download is finished. This option is ignored if --output is an absolute path -o, --output [TYPES:]TEMPLATE Output filename template; see "OUTPUT TEMPLATE" for details --output-na-placeholder TEXT Placeholder value for unavailable meta fields in output filename template (default: "NA") --restrict-filenames Restrict filenames to only ASCII characters, and avoid "&" and spaces in filenames --no-restrict-filenames Allow Unicode characters, "&" and spaces in filenames (default) --windows-filenames Force filenames to be Windows-compatible --no-windows-filenames Make filenames Windows-compatible only if using Windows (default) --trim-filenames LENGTH Limit the filename length (excluding extension) to the specified number of characters -w, --no-overwrites Do not overwrite any files --force-overwrites Overwrite all video and metadata files. This option includes --no-continue --no-force-overwrites Do not overwrite the video, but overwrite related files (default) -c, --continue Resume partially downloaded files/fragments (default) --no-continue Do not resume partially downloaded fragments. If the file is not fragmented, restart download of the entire file --part Use .part files instead of writing directly into output file (default) --no-part Do not use .part files - write directly into output file --mtime Use the Last-modified header to set the file modification time (default) --no-mtime Do not use the Last-modified header to set the file modification time --write-description Write video description to a .description file --no-write-description Do not write video description (default) --write-info-json Write video metadata to a .info.json file (this may contain personal information) --no-write-info-json Do not write video metadata (default) --write-playlist-metafiles Write playlist metadata in addition to the video metadata when using --write-info-json, --write-description etc. (default) --no-write-playlist-metafiles Do not write playlist metadata when using --write-info-json, --write-description etc. --clean-info-json Remove some private fields such as filenames from the infojson. Note that it could still contain some personal information (default) --no-clean-info-json Write all fields to the infojson --write-comments Retrieve video comments to be placed in the infojson. The comments are fetched even without this option if the extraction is known to be quick (Alias: --get-comments) --no-write-comments Do not retrieve video comments unless the extraction is known to be quick (Alias: --no-get-comments) --load-info-json FILE JSON file containing the video information (created with the "--write-info-json" option) --cookies FILE Netscape formatted file to read cookies from and dump cookie jar in --no-cookies Do not read/dump cookies from/to file (default) --cookies-from-browser BROWSER[+KEYRING][:PROFILE] The name of the browser and (optionally) the name/path of the profile to load cookies from, separated by a ":". Currently supported browsers are: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi. By default, the most recently accessed profile is used. The keyring used for decrypting Chromium cookies on Linux can be (optionally) specified after the browser name separated by a "+". Currently supported keyrings are: basictext, gnomekeyring, kwallet --no-cookies-from-browser Do not load cookies from browser (default) --cache-dir DIR Location in the filesystem where youtube-dl can store some downloaded information (such as client ids and signatures) permanently. By default $XDG_CACHE_HOME/yt-dlp or ~/.cache/yt-dlp --no-cache-dir Disable filesystem caching --rm-cache-dir Delete all filesystem cache files ## Thumbnail Options: --write-thumbnail Write thumbnail image to disk --no-write-thumbnail Do not write thumbnail image to disk (default) --write-all-thumbnails Write all thumbnail image formats to disk --list-thumbnails List available thumbnails of each video. Simulate unless --no-simulate is used ## Internet Shortcut Options: --write-link Write an internet shortcut file, depending on the current platform (.url, .webloc or .desktop). The URL may be cached by the OS --write-url-link Write a .url Windows internet shortcut. The OS caches the URL based on the file path --write-webloc-link Write a .webloc macOS internet shortcut --write-desktop-link Write a .desktop Linux internet shortcut ## Verbosity and Simulation Options: -q, --quiet Activate quiet mode. If used with --verbose, print the log to stderr --no-warnings Ignore warnings -s, --simulate Do not download the video and do not write anything to disk --no-simulate Download the video even if printing/listing options are used --ignore-no-formats-error Ignore "No video formats" error. Useful for extracting metadata even if the videos are not actually available for download (experimental) --no-ignore-no-formats-error Throw error when no downloadable video formats are found (default) --skip-download Do not download the video but write all related files (Alias: --no-download) -O, --print [WHEN:]TEMPLATE Field name or output template to print to screen, optionally prefixed with when to print it, separated by a ":". Supported values of "WHEN" are the same as that of --use-postprocessor, and "video" (default). Implies --quiet and --simulate (unless --no-simulate is used). This option can be used multiple times --print-to-file [WHEN:]TEMPLATE FILE Append given template to the file. The values of WHEN and TEMPLATE are same as that of --print. FILE uses the same syntax as the output template. This option can be used multiple times -j, --dump-json Quiet, but print JSON information for each video. Simulate unless --no-simulate is used. See "OUTPUT TEMPLATE" for a description of available keys -J, --dump-single-json Quiet, but print JSON information for each url or infojson passed. Simulate unless --no-simulate is used. If the URL refers to a playlist, the whole playlist information is dumped in a single line --force-write-archive Force download archive entries to be written as far as no errors occur, even if -s or another simulation option is used (Alias: --force-download-archive) --newline Output progress bar as new lines --no-progress Do not print progress bar --progress Show progress bar, even if in quiet mode --console-title Display progress in console titlebar --progress-template [TYPES:]TEMPLATE Template for progress outputs, optionally prefixed with one of "download:" (default), "download-title:" (the console title), "postprocess:", or "postprocess-title:". The video's fields are accessible under the "info" key and the progress attributes are accessible under "progress" key. E.g.: --console-title --progress-template "download-title:%(info.id)s-%(progress.eta)s" -v, --verbose Print various debugging information --dump-pages Print downloaded pages encoded using base64 to debug problems (very verbose) --write-pages Write downloaded intermediary pages to files in the current directory to debug problems --print-traffic Display sent and read HTTP traffic ## Workarounds: --encoding ENCODING Force the specified encoding (experimental) --legacy-server-connect Explicitly allow HTTPS connection to servers that do not support RFC 5746 secure renegotiation --no-check-certificates Suppress HTTPS certificate validation --prefer-insecure Use an unencrypted connection to retrieve information about the video (Currently supported only for YouTube) --add-header FIELD:VALUE Specify a custom HTTP header and its value, separated by a colon ":". You can use this option multiple times --bidi-workaround Work around terminals that lack bidirectional text support. Requires bidiv or fribidi executable in PATH --sleep-requests SECONDS Number of seconds to sleep between requests during data extraction --sleep-interval SECONDS Number of seconds to sleep before each download. This is the minimum time to sleep when used along with --max-sleep-interval (Alias: --min-sleep-interval) --max-sleep-interval SECONDS Maximum number of seconds to sleep. Can only be used along with --min-sleep-interval --sleep-subtitles SECONDS Number of seconds to sleep before each subtitle download ## Video Format Options: -f, --format FORMAT Video format code, see "FORMAT SELECTION" for more details -S, --format-sort SORTORDER Sort the formats by the fields given, see "Sorting Formats" for more details --S-force, --format-sort-force Force user specified sort order to have precedence over all fields, see "Sorting Formats" for more details --no-format-sort-force Some fields have precedence over the user specified sort order (default), see "Sorting Formats" for more details --video-multistreams Allow multiple video streams to be merged into a single file --no-video-multistreams Only one video stream is downloaded for each output file (default) --audio-multistreams Allow multiple audio streams to be merged into a single file --no-audio-multistreams Only one audio stream is downloaded for each output file (default) --prefer-free-formats Prefer video formats with free containers over non-free ones of same quality. Use with "-S ext" to strictly prefer free containers irrespective of quality --no-prefer-free-formats Don't give any special preference to free containers (default) --check-formats Make sure formats are selected only from those that are actually downloadable --check-all-formats Check all formats for whether they are actually downloadable --no-check-formats Do not check that the formats are actually downloadable -F, --list-formats List available formats of each video. Simulate unless --no-simulate is used --merge-output-format FORMAT If a merge is required (e.g. bestvideo+bestaudio), output to given container format. One of mkv, mp4, ogg, webm, flv. Ignored if no merge is required ## Subtitle Options: --write-subs Write subtitle file --no-write-subs Do not write subtitle file (default) --write-auto-subs Write automatically generated subtitle file (Alias: --write-automatic-subs) --no-write-auto-subs Do not write auto-generated subtitles (default) (Alias: --no-write-automatic-subs) --list-subs List available subtitles of each video. Simulate unless --no-simulate is used --sub-format FORMAT Subtitle format, accepts formats preference, for example: "srt" or "ass/srt/best" --sub-langs LANGS Languages of the subtitles to download (can be regex) or "all" separated by commas. (Eg: --sub-langs "en.*,ja") You can prefix the language code with a "-" to exempt it from the requested languages. (Eg: --sub-langs all,-live_chat) Use --list-subs for a list of available language tags ## Authentication Options: -u, --username USERNAME Login with this account ID -p, --password PASSWORD Account password. If this option is left out, yt-dlp will ask interactively -2, --twofactor TWOFACTOR Two-factor authentication code -n, --netrc Use .netrc authentication data --netrc-location PATH Location of .netrc authentication data; either the path or its containing directory. Defaults to ~/.netrc --video-password PASSWORD Video password (vimeo, youku) --ap-mso MSO Adobe Pass multiple-system operator (TV provider) identifier, use --ap-list-mso for a list of available MSOs --ap-username USERNAME Multiple-system operator account login --ap-password PASSWORD Multiple-system operator account password. If this option is left out, yt-dlp will ask interactively --ap-list-mso List all supported multiple-system operators ## Post-Processing Options: -x, --extract-audio Convert video files to audio-only files (requires ffmpeg and ffprobe) --audio-format FORMAT Specify audio format to convert the audio to when -x is used. Currently supported formats are: best (default) or one of aac, flac, mp3, m4a, opus, vorbis, wav, alac --audio-quality QUALITY Specify ffmpeg audio quality to use when converting the audio with -x. Insert a value between 0 (best) and 10 (worst) for VBR or a specific bitrate like 128K (default 5) --remux-video FORMAT Remux the video into another container if necessary (currently supported: mp4, mkv, flv, webm, mov, avi, mka, ogg, aac, flac, mp3, m4a, opus, vorbis, wav, alac). If target container does not support the video/audio codec, remuxing will fail. You can specify multiple rules; Eg. "aac>m4a/mov>mp4/mkv" will remux aac to m4a, mov to mp4 and anything else to mkv. --recode-video FORMAT Re-encode the video into another format if re-encoding is necessary. The syntax and supported formats are the same as --remux-video --postprocessor-args NAME:ARGS Give these arguments to the postprocessors. Specify the postprocessor/executable name and the arguments separated by a colon ":" to give the argument to the specified postprocessor/executable. Supported PP are: Merger, ModifyChapters, SplitChapters, ExtractAudio, VideoRemuxer, VideoConvertor, Metadata, EmbedSubtitle, EmbedThumbnail, SubtitlesConvertor, ThumbnailsConvertor, FixupStretched, FixupM4a, FixupM3u8, FixupTimestamp and FixupDuration. The supported executables are: AtomicParsley, FFmpeg and FFprobe. You can also specify "PP+EXE:ARGS" to give the arguments to the specified executable only when being used by the specified postprocessor. Additionally, for ffmpeg/ffprobe, "_i"/"_o" can be appended to the prefix optionally followed by a number to pass the argument before the specified input/output file. Eg: --ppa "Merger+ffmpeg_i1:-v quiet". You can use this option multiple times to give different arguments to different postprocessors. (Alias: --ppa) -k, --keep-video Keep the intermediate video file on disk after post-processing --no-keep-video Delete the intermediate video file after post-processing (default) --post-overwrites Overwrite post-processed files (default) --no-post-overwrites Do not overwrite post-processed files --embed-subs Embed subtitles in the video (only for mp4, webm and mkv videos) --no-embed-subs Do not embed subtitles (default) --embed-thumbnail Embed thumbnail in the video as cover art --no-embed-thumbnail Do not embed thumbnail (default) --embed-metadata Embed metadata to the video file. Also embeds chapters/infojson if present unless --no-embed-chapters/--no-embed-info-json are used (Alias: --add-metadata) --no-embed-metadata Do not add metadata to file (default) (Alias: --no-add-metadata) --embed-chapters Add chapter markers to the video file (Alias: --add-chapters) --no-embed-chapters Do not add chapter markers (default) (Alias: --no-add-chapters) --embed-info-json Embed the infojson as an attachment to mkv/mka video files --no-embed-info-json Do not embed the infojson as an attachment to the video file --parse-metadata FROM:TO Parse additional metadata like title/artist from other fields; see "MODIFYING METADATA" for details --replace-in-metadata FIELDS REGEX REPLACE Replace text in a metadata field using the given regex. This option can be used multiple times --xattrs Write metadata to the video file's xattrs (using dublin core and xdg standards) --concat-playlist POLICY Concatenate videos in a playlist. One of "never", "always", or "multi_video" (default; only when the videos form a single show). All the video files must have same codecs and number of streams to be concatable. The "pl_video:" prefix can be used with "--paths" and "--output" to set the output filename for the split files. See "OUTPUT TEMPLATE" for details --fixup POLICY Automatically correct known faults of the file. One of never (do nothing), warn (only emit a warning), detect_or_warn (the default; fix file if we can, warn otherwise), force (try fixing even if file already exists) --ffmpeg-location PATH Location of the ffmpeg binary; either the path to the binary or its containing directory --exec [WHEN:]CMD Execute a command, optionally prefixed with when to execute it (after_move if unspecified), separated by a ":". Supported values of "WHEN" are the same as that of --use-postprocessor. Same syntax as the output template can be used to pass any field as arguments to the command. After download, an additional field "filepath" that contains the final path of the downloaded file is also available, and if no fields are passed, %(filepath)q is appended to the end of the command. This option can be used multiple times --no-exec Remove any previously defined --exec --convert-subs FORMAT Convert the subtitles to another format (currently supported: srt, vtt, ass, lrc) (Alias: --convert-subtitles) --convert-thumbnails FORMAT Convert the thumbnails to another format (currently supported: jpg, png, webp) --split-chapters Split video into multiple files based on internal chapters. The "chapter:" prefix can be used with "--paths" and "--output" to set the output filename for the split files. See "OUTPUT TEMPLATE" for details --no-split-chapters Do not split video based on chapters (default) --remove-chapters REGEX Remove chapters whose title matches the given regular expression. Time ranges prefixed by a "*" can also be used in place of chapters to remove the specified range. Eg: --remove-chapters "*10:15-15:00" --remove-chapters "intro". This option can be used multiple times --no-remove-chapters Do not remove any chapters from the file (default) --force-keyframes-at-cuts Force keyframes around the chapters before removing/splitting them. Requires a re-encode and thus is very slow, but the resulting video may have fewer artifacts around the cuts --no-force-keyframes-at-cuts Do not force keyframes around the chapters when cutting/splitting (default) --use-postprocessor NAME[:ARGS] The (case sensitive) name of plugin postprocessors to be enabled, and (optionally) arguments to be passed to it, separated by a colon ":". ARGS are a semicolon ";" delimited list of NAME=VALUE. The "when" argument determines when the postprocessor is invoked. It can be one of "pre_process" (after video extraction), "after_filter" (after video passes filter), "before_dl" (before each video download), "post_process" (after each video download; default), "after_move" (after moving video file to it's final locations), "after_video" (after downloading and processing all formats of a video), or "playlist" (at end of playlist). This option can be used multiple times to add different postprocessors ## SponsorBlock Options: Make chapter entries for, or remove various segments (sponsor, introductions, etc.) from downloaded YouTube videos using the [SponsorBlock API](https://sponsor.ajay.app) --sponsorblock-mark CATS SponsorBlock categories to create chapters for, separated by commas. Available categories are all, default(=all), sponsor, intro, outro, selfpromo, preview, filler, interaction, music_offtopic, poi_highlight. You can prefix the category with a "-" to exempt it. See [1] for description of the categories. Eg: --sponsorblock-mark all,-preview [1] https://wiki.sponsor.ajay.app/w/Segment_Categories --sponsorblock-remove CATS SponsorBlock categories to be removed from the video file, separated by commas. If a category is present in both mark and remove, remove takes precedence. The syntax and available categories are the same as for --sponsorblock-mark except that "default" refers to "all,-filler" and poi_highlight is not available --sponsorblock-chapter-title TEMPLATE The title template for SponsorBlock chapters created by --sponsorblock-mark. The same syntax as the output template is used, but the only available fields are start_time, end_time, category, categories, name, category_names. Defaults to "[SponsorBlock]: %(category_names)l" --no-sponsorblock Disable both --sponsorblock-mark and --sponsorblock-remove --sponsorblock-api URL SponsorBlock API location, defaults to https://sponsor.ajay.app ## Extractor Options: --extractor-retries RETRIES Number of retries for known extractor errors (default is 3), or "infinite" --allow-dynamic-mpd Process dynamic DASH manifests (default) (Alias: --no-ignore-dynamic-mpd) --ignore-dynamic-mpd Do not process dynamic DASH manifests (Alias: --no-allow-dynamic-mpd) --hls-split-discontinuity Split HLS playlists to different formats at discontinuities such as ad breaks --no-hls-split-discontinuity Do not split HLS playlists to different formats at discontinuities such as ad breaks (default) --extractor-args KEY:ARGS Pass these arguments to the extractor. See "EXTRACTOR ARGUMENTS" for details. You can use this option multiple times to give arguments for different extractors # CONFIGURATION You can configure yt-dlp by placing any supported command line option to a configuration file. The configuration is loaded from the following locations: 1. **Main Configuration**: The file given by `--config-location` 1. **Portable Configuration**: `yt-dlp.conf` in the same directory as the bundled binary. If you are running from source-code (`<root dir>/yt_dlp/__main__.py`), the root directory is used instead. 1. **Home Configuration**: `yt-dlp.conf` in the home path given by `-P`, or in the current directory if no such path is given 1. **User Configuration**: * `%XDG_CONFIG_HOME%/yt-dlp/config` (recommended on Linux/macOS) * `%XDG_CONFIG_HOME%/yt-dlp.conf` * `%APPDATA%/yt-dlp/config` (recommended on Windows) * `%APPDATA%/yt-dlp/config.txt` * `~/yt-dlp.conf` * `~/yt-dlp.conf.txt` `%XDG_CONFIG_HOME%` defaults to `~/.config` if undefined. On windows, `%APPDATA%` generally points to `C:\Users\<user name>\AppData\Roaming` and `~` points to `%HOME%` if present, `%USERPROFILE%` (generally `C:\Users\<user name>`), or `%HOMEDRIVE%%HOMEPATH%` 1. **System Configuration**: `/etc/yt-dlp.conf` For example, with the following configuration file yt-dlp will always extract the audio, not copy the mtime, use a proxy and save all videos under `YouTube` directory in your home directory: ``` # Lines starting with # are comments # Always extract audio -x # Do not copy the mtime --no-mtime # Use this proxy --proxy 127.0.0.1:3128 # Save all videos under YouTube directory in your home directory -o ~/YouTube/%(title)s.%(ext)s ``` Note that options in configuration file are just the same options aka switches used in regular command line calls; thus there **must be no whitespace** after `-` or `--`, e.g. `-o` or `--proxy` but not `- o` or `-- proxy`. You can use `--ignore-config` if you want to disable all configuration files for a particular yt-dlp run. If `--ignore-config` is found inside any configuration file, no further configuration will be loaded. For example, having the option in the portable configuration file prevents loading of home, user, and system configurations. Additionally, (for backward compatibility) if `--ignore-config` is found inside the system configuration file, the user configuration is not loaded. ### Authentication with `.netrc` file You may also want to configure automatic credentials storage for extractors that support authentication (by providing login and password with `--username` and `--password`) in order not to pass credentials as command line arguments on every yt-dlp execution and prevent tracking plain text passwords in the shell command history. You can achieve this using a [`.netrc` file](https://stackoverflow.com/tags/.netrc/info) on a per extractor basis. For that you will need to create a `.netrc` file in `--netrc-location` and restrict permissions to read/write by only you: ``` touch $HOME/.netrc chmod a-rwx,u+rw $HOME/.netrc ``` After that you can add credentials for an extractor in the following format, where *extractor* is the name of the extractor in lowercase: ``` machine <extractor> login <username> password <password> ``` For example: ``` machine youtube login myaccount@gmail.com password my_youtube_password machine twitch login my_twitch_account_name password my_twitch_password ``` To activate authentication with the `.netrc` file you should pass `--netrc` to yt-dlp or place it in the [configuration file](#configuration). The default location of the .netrc file is `$HOME` (`~`) in UNIX. On Windows, it is `%HOME%` if present, `%USERPROFILE%` (generally `C:\Users\<user name>`) or `%HOMEDRIVE%%HOMEPATH%` # OUTPUT TEMPLATE The `-o` option is used to indicate a template for the output file names while `-P` option is used to specify the path each type of file should be saved to. <!-- MANPAGE: BEGIN EXCLUDED SECTION --> **tl;dr:** [navigate me to examples](#output-template-examples). <!-- MANPAGE: END EXCLUDED SECTION --> The simplest usage of `-o` is not to set any template arguments when downloading a single file, like in `yt-dlp -o funny_video.flv "https://some/video"` (hard-coding file extension like this is _not_ recommended and could break some post-processing). It may however also contain special sequences that will be replaced when downloading each video. The special sequences may be formatted according to [Python string formatting operations](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting). For example, `%(NAME)s` or `%(NAME)05d`. To clarify, that is a percent symbol followed by a name in parentheses, followed by formatting operations. The field names themselves (the part inside the parenthesis) can also have some special formatting: 1. **Object traversal**: The dictionaries and lists available in metadata can be traversed by using a `.` (dot) separator. You can also do python slicing using `:`. Eg: `%(tags.0)s`, `%(subtitles.en.-1.ext)s`, `%(id.3:7:-1)s`, `%(formats.:.format_id)s`. `%()s` refers to the entire infodict. Note that all the fields that become available using this method are not listed below. Use `-j` to see such fields 1. **Addition**: Addition and subtraction of numeric fields can be done using `+` and `-` respectively. Eg: `%(playlist_index+10)03d`, `%(n_entries+1-playlist_index)d` 1. **Date/time Formatting**: Date/time fields can be formatted according to [strftime formatting](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) by specifying it separated from the field name using a `>`. Eg: `%(duration>%H-%M-%S)s`, `%(upload_date>%Y-%m-%d)s`, `%(epoch-3600>%H-%M-%S)s` 1. **Alternatives**: Alternate fields can be specified separated with a `,`. Eg: `%(release_date>%Y,upload_date>%Y|Unknown)s` 1. **Replacement**: A replacement value can specified using a `&` separator. If the field is *not* empty, this replacement value will be used instead of the actual field content. This is done after alternate fields are considered; thus the replacement is used if *any* of the alternative fields is *not* empty. 1. **Default**: A literal default value can be specified for when the field is empty using a `|` separator. This overrides `--output-na-template`. Eg: `%(uploader|Unknown)s` 1. **More Conversions**: In addition to the normal format types `diouxXeEfFgGcrs`, `B`, `j`, `l`, `q`, `D`, `S` can be used for converting to **B**ytes, **j**son (flag `#` for pretty-printing), a comma separated **l**ist (flag `#` for `\n` newline-separated), a string **q**uoted for the terminal (flag `#` to split a list into different arguments), to add **D**ecimal suffixes (Eg: 10M) (flag `#` to use 1024 as factor), and to **S**anitize as filename (flag `#` for restricted), respectively 1. **Unicode normalization**: The format type `U` can be used for NFC [unicode normalization](https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize). The alternate form flag (`#`) changes the normalization to NFD and the conversion flag `+` can be used for NFKC/NFKD compatibility equivalence normalization. Eg: `%(title)+.100U` is NFKC To summarize, the general syntax for a field is: ``` %(name[.keys][addition][>strf][,alternate][&replacement][|default])[flags][width][.precision][length]type ``` Additionally, you can set different output templates for the various metadata files separately from the general output template by specifying the type of file followed by the template separated by a colon `:`. The different file types supported are `subtitle`, `thumbnail`, `description`, `annotation` (deprecated), `infojson`, `link`, `pl_thumbnail`, `pl_description`, `pl_infojson`, `chapter`, `pl_video`. For example, `-o "%(title)s.%(ext)s" -o "thumbnail:%(title)s\%(title)s.%(ext)s"` will put the thumbnails in a folder with the same name as the video. If any of the templates is empty, that type of file will not be written. Eg: `--write-thumbnail -o "thumbnail:"` will write thumbnails only for playlists and not for video. The available fields are: - `id` (string): Video identifier - `title` (string): Video title - `fulltitle` (string): Video title ignoring live timestamp and generic title - `url` (string): Video URL - `ext` (string): Video filename extension - `alt_title` (string): A secondary title of the video - `description` (string): The description of the video - `display_id` (string): An alternative identifier for the video - `uploader` (string): Full name of the video uploader - `license` (string): License name the video is licensed under - `creator` (string): The creator of the video - `timestamp` (numeric): UNIX timestamp of the moment the video became available - `upload_date` (string): Video upload date in UTC (YYYYMMDD) - `release_timestamp` (numeric): UNIX timestamp of the moment the video was released - `release_date` (string): The date (YYYYMMDD) when the video was released in UTC - `modified_timestamp` (numeric): UNIX timestamp of the moment the video was last modified - `modified_date` (string): The date (YYYYMMDD) when the video was last modified in UTC - `uploader_id` (string): Nickname or id of the video uploader - `channel` (string): Full name of the channel the video is uploaded on - `channel_id` (string): Id of the channel - `channel_follower_count` (numeric): Number of followers of the channel - `location` (string): Physical location where the video was filmed - `duration` (numeric): Length of the video in seconds - `duration_string` (string): Length of the video (HH:mm:ss) - `view_count` (numeric): How many users have watched the video on the platform - `like_count` (numeric): Number of positive ratings of the video - `dislike_count` (numeric): Number of negative ratings of the video - `repost_count` (numeric): Number of reposts of the video - `average_rating` (numeric): Average rating give by users, the scale used depends on the webpage - `comment_count` (numeric): Number of comments on the video (For some extractors, comments are only downloaded at the end, and so this field cannot be used) - `age_limit` (numeric): Age restriction for the video (years) - `live_status` (string): One of "is_live", "was_live", "is_upcoming", "not_live" - `is_live` (boolean): Whether this video is a live stream or a fixed-length video - `was_live` (boolean): Whether this video was originally a live stream - `playable_in_embed` (string): Whether this video is allowed to play in embedded players on other sites - `availability` (string): Whether the video is "private", "premium_only", "subscriber_only", "needs_auth", "unlisted" or "public" - `start_time` (numeric): Time in seconds where the reproduction should start, as specified in the URL - `end_time` (numeric): Time in seconds where the reproduction should end, as specified in the URL - `format` (string): A human-readable description of the format - `format_id` (string): Format code specified by `--format` - `format_note` (string): Additional info about the format - `width` (numeric): Width of the video - `height` (numeric): Height of the video - `resolution` (string): Textual description of width and height - `tbr` (numeric): Average bitrate of audio and video in KBit/s - `abr` (numeric): Average audio bitrate in KBit/s - `acodec` (string): Name of the audio codec in use - `asr` (numeric): Audio sampling rate in Hertz - `vbr` (numeric): Average video bitrate in KBit/s - `fps` (numeric): Frame rate - `dynamic_range` (string): The dynamic range of the video - `vcodec` (string): Name of the video codec in use - `container` (string): Name of the container format - `filesize` (numeric): The number of bytes, if known in advance - `filesize_approx` (numeric): An estimate for the number of bytes - `protocol` (string): The protocol that will be used for the actual download - `extractor` (string): Name of the extractor - `extractor_key` (string): Key name of the extractor - `epoch` (numeric): Unix epoch of when the information extraction was completed - `autonumber` (numeric): Number that will be increased with each download, starting at `--autonumber-start` - `video_autonumber` (numeric): Number that will be increased with each video - `n_entries` (numeric): Total number of extracted items in the playlist - `playlist_id` (string): Identifier of the playlist that contains the video - `playlist_title` (string): Name of the playlist that contains the video - `playlist` (string): `playlist_id` or `playlist_title` - `playlist_count` (numeric): Total number of items in the playlist. May not be known if entire playlist is not extracted - `playlist_index` (numeric): Index of the video in the playlist padded with leading zeros according the final index - `playlist_autonumber` (numeric): Position of the video in the playlist download queue padded with leading zeros according to the total length of the playlist - `playlist_uploader` (string): Full name of the playlist uploader - `playlist_uploader_id` (string): Nickname or id of the playlist uploader - `webpage_url` (string): A URL to the video webpage which if given to yt-dlp should allow to get the same result again - `webpage_url_basename` (string): The basename of the webpage URL - `webpage_url_domain` (string): The domain of the webpage URL - `original_url` (string): The URL given by the user (or same as `webpage_url` for playlist entries) Available for the video that belongs to some logical chapter or section: - `chapter` (string): Name or title of the chapter the video belongs to - `chapter_number` (numeric): Number of the chapter the video belongs to - `chapter_id` (string): Id of the chapter the video belongs to Available for the video that is an episode of some series or programme: - `series` (string): Title of the series or programme the video episode belongs to - `season` (string): Title of the season the video episode belongs to - `season_number` (numeric): Number of the season the video episode belongs to - `season_id` (string): Id of the season the video episode belongs to - `episode` (string): Title of the video episode - `episode_number` (numeric): Number of the video episode within a season - `episode_id` (string): Id of the video episode Available for the media that is a track or a part of a music album: - `track` (string): Title of the track - `track_number` (numeric): Number of the track within an album or a disc - `track_id` (string): Id of the track - `artist` (string): Artist(s) of the track - `genre` (string): Genre(s) of the track - `album` (string): Title of the album the track belongs to - `album_type` (string): Type of the album - `album_artist` (string): List of all artists appeared on the album - `disc_number` (numeric): Number of the disc or other physical medium the track belongs to - `release_year` (numeric): Year (YYYY) when the album was released Available for `chapter:` prefix when using `--split-chapters` for videos with internal chapters: - `section_title` (string): Title of the chapter - `section_number` (numeric): Number of the chapter within the file - `section_start` (numeric): Start time of the chapter in seconds - `section_end` (numeric): End time of the chapter in seconds Available only when used in `--print`: - `urls` (string): The URLs of all requested formats, one in each line - `filename` (string): Name of the video file. Note that the actual filename may be different due to post-processing. Use `--exec echo` to get the name after all postprocessing is complete - `formats_table` (table): The video format table as printed by `--list-formats` - `thumbnails_table` (table): The thumbnail format table as printed by `--list-thumbnails` - `subtitles_table` (table): The subtitle format table as printed by `--list-subs` - `automatic_captions_table` (table): The automatic subtitle format table as printed by `--list-subs` Available only in `--sponsorblock-chapter-title`: - `start_time` (numeric): Start time of the chapter in seconds - `end_time` (numeric): End time of the chapter in seconds - `categories` (list): The SponsorBlock categories the chapter belongs to - `category` (string): The smallest SponsorBlock category the chapter belongs to - `category_names` (list): Friendly names of the categories - `name` (string): Friendly name of the smallest category Each aforementioned sequence when referenced in an output template will be replaced by the actual value corresponding to the sequence name. For example for `-o %(title)s-%(id)s.%(ext)s` and an mp4 video with title `yt-dlp test video` and id `BaW_jenozKc`, this will result in a `yt-dlp test video-BaW_jenozKc.mp4` file created in the current directory. Note that some of the sequences are not guaranteed to be present since they depend on the metadata obtained by a particular extractor. Such sequences will be replaced with placeholder value provided with `--output-na-placeholder` (`NA` by default). **Tip**: Look at the `-j` output to identify which fields are available for the particular URL For numeric sequences you can use [numeric related formatting](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting), for example, `%(view_count)05d` will result in a string with view count padded with zeros up to 5 characters, like in `00042`. Output templates can also contain arbitrary hierarchical path, e.g. `-o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"` which will result in downloading each video in a directory corresponding to this path template. Any missing directory will be automatically created for you. To use percent literals in an output template use `%%`. To output to stdout use `-o -`. The current default template is `%(title)s [%(id)s].%(ext)s`. In some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the `--restrict-filenames` flag to get a shorter title. <!-- MANPAGE: BEGIN EXCLUDED SECTION --> #### Output template and Windows batch files If you are using an output template inside a Windows batch file then you must escape plain percent characters (`%`) by doubling, so that `-o "%(title)s-%(id)s.%(ext)s"` should become `-o "%%(title)s-%%(id)s.%%(ext)s"`. However you should not touch `%`'s that are not plain characters, e.g. environment variables for expansion should stay intact: `-o "C:\%HOMEPATH%\Desktop\%%(title)s.%%(ext)s"`. <!-- MANPAGE: END EXCLUDED SECTION --> #### Output template examples ```bash $ yt-dlp --get-filename -o "test video.%(ext)s" BaW_jenozKc test video.webm # Literal name with correct extension $ yt-dlp --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc youtube-dl test video ''_ä↭𝕐.webm # All kinds of weird characters $ yt-dlp --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc --restrict-filenames youtube-dl_test_video_.webm # Restricted file name # Download YouTube playlist videos in separate directory indexed by video order in a playlist $ yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re" # Download YouTube playlist videos in separate directories according to their uploaded year $ yt-dlp -o "%(upload_date>%Y)s/%(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re" # Prefix playlist index with " - " separator, but only if it is available $ yt-dlp -o '%(playlist_index|)s%(playlist_index& - |)s%(title)s.%(ext)s' BaW_jenozKc "https://www.youtube.com/user/TheLinuxFoundation/playlists" # Download all playlists of YouTube channel/user keeping each playlist in separate directory: $ yt-dlp -o "%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/user/TheLinuxFoundation/playlists" # Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home $ yt-dlp -u user -p password -P "~/MyVideos" -o "%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s" "https://www.udemy.com/java-tutorial" # Download entire series season keeping each series and each season in separate directory under C:/MyVideos $ yt-dlp -P "C:/MyVideos" -o "%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" "https://videomore.ru/kino_v_detalayah/5_sezon/367617" # Download video as "C:\MyVideos\uploader\title.ext", subtitles as "C:\MyVideos\subs\uploader\title.ext" # and put all temporary files in "C:\MyVideos\tmp" $ yt-dlp -P "C:/MyVideos" -P "temp:tmp" -P "subtitle:subs" -o "%(uploader)s/%(title)s.%(ext)s" BaW_jenoz --write-subs # Download video as "C:\MyVideos\uploader\title.ext" and subtitles as "C:\MyVideos\uploader\subs\title.ext" $ yt-dlp -P "C:/MyVideos" -o "%(uploader)s/%(title)s.%(ext)s" -o "subtitle:%(uploader)s/subs/%(title)s.%(ext)s" BaW_jenozKc --write-subs # Stream the video being downloaded to stdout $ yt-dlp -o - BaW_jenozKc ``` # FORMAT SELECTION By default, yt-dlp tries to download the best available quality if you **don't** pass any options. This is generally equivalent to using `-f bestvideo*+bestaudio/best`. However, if multiple audiostreams is enabled (`--audio-multistreams`), the default format changes to `-f bestvideo+bestaudio/best`. Similarly, if ffmpeg is unavailable, or if you use yt-dlp to stream to `stdout` (`-o -`), the default becomes `-f best/bestvideo+bestaudio`. **Deprecation warning**: Latest versions of yt-dlp can stream multiple formats to the stdout simultaneously using ffmpeg. So, in future versions, the default for this will be set to `-f bv*+ba/b` similar to normal downloads. If you want to preserve the `-f b/bv+ba` setting, it is recommended to explicitly specify it in the configuration options. The general syntax for format selection is `-f FORMAT` (or `--format FORMAT`) where `FORMAT` is a *selector expression*, i.e. an expression that describes format or formats you would like to download. <!-- MANPAGE: BEGIN EXCLUDED SECTION --> **tl;dr:** [navigate me to examples](#format-selection-examples). <!-- MANPAGE: END EXCLUDED SECTION --> The simplest case is requesting a specific format, for example with `-f 22` you can download the format with format code equal to 22. You can get the list of available format codes for particular video using `--list-formats` or `-F`. Note that these format codes are extractor specific. You can also use a file extension (currently `3gp`, `aac`, `flv`, `m4a`, `mp3`, `mp4`, `ogg`, `wav`, `webm` are supported) to download the best quality format of a particular file extension served as a single file, e.g. `-f webm` will download the best quality format with the `webm` extension served as a single file. You can use `-f -` to interactively provide the format selector *for each video* You can also use special names to select particular edge case formats: - `all`: Select **all formats** separately - `mergeall`: Select and **merge all formats** (Must be used with `--audio-multistreams`, `--video-multistreams` or both) - `b*`, `best*`: Select the best quality format that **contains either** a video or an audio - `b`, `best`: Select the best quality format that **contains both** video and audio. Equivalent to `best*[vcodec!=none][acodec!=none]` - `bv`, `bestvideo`: Select the best quality **video-only** format. Equivalent to `best*[acodec=none]` - `bv*`, `bestvideo*`: Select the best quality format that **contains video**. It may also contain audio. Equivalent to `best*[vcodec!=none]` - `ba`, `bestaudio`: Select the best quality **audio-only** format. Equivalent to `best*[vcodec=none]` - `ba*`, `bestaudio*`: Select the best quality format that **contains audio**. It may also contain video. Equivalent to `best*[acodec!=none]` ([Do not use!](https://github.com/yt-dlp/yt-dlp/issues/979#issuecomment-919629354)) - `w*`, `worst*`: Select the worst quality format that contains either a video or an audio - `w`, `worst`: Select the worst quality format that contains both video and audio. Equivalent to `worst*[vcodec!=none][acodec!=none]` - `wv`, `worstvideo`: Select the worst quality video-only format. Equivalent to `worst*[acodec=none]` - `wv*`, `worstvideo*`: Select the worst quality format that contains video. It may also contain audio. Equivalent to `worst*[vcodec!=none]` - `wa`, `worstaudio`: Select the worst quality audio-only format. Equivalent to `worst*[vcodec=none]` - `wa*`, `worstaudio*`: Select the worst quality format that contains audio. It may also contain video. Equivalent to `worst*[acodec!=none]` For example, to download the worst quality video-only format you can use `-f worstvideo`. It is however recommended not to use `worst` and related options. When your format selector is `worst`, the format which is worst in all respects is selected. Most of the time, what you actually want is the video with the smallest filesize instead. So it is generally better to use `-S +size` or more rigorously, `-S +size,+br,+res,+fps` instead of `-f worst`. See [sorting formats](#sorting-formats) for more details. You can select the n'th best format of a type by using `best<type>.<n>`. For example, `best.2` will select the 2nd best combined format. Similarly, `bv*.3` will select the 3rd best format that contains a video stream. If you want to download multiple videos and they don't have the same formats available, you can specify the order of preference using slashes. Note that formats on the left hand side are preferred, for example `-f 22/17/18` will download format 22 if it's available, otherwise it will download format 17 if it's available, otherwise it will download format 18 if it's available, otherwise it will complain that no suitable formats are available for download. If you want to download several formats of the same video use a comma as a separator, e.g. `-f 22,17,18` will download all these three formats, of course if they are available. Or a more sophisticated example combined with the precedence feature: `-f 136/137/mp4/bestvideo,140/m4a/bestaudio`. You can merge the video and audio of multiple formats into a single file using `-f <format1>+<format2>+...` (requires ffmpeg installed), for example `-f bestvideo+bestaudio` will download the best video-only format, the best audio-only format and mux them together with ffmpeg. **Deprecation warning**: Since the *below* described behavior is complex and counter-intuitive, this will be removed and multistreams will be enabled by default in the future. A new operator will be instead added to limit formats to single audio/video Unless `--video-multistreams` is used, all formats with a video stream except the first one are ignored. Similarly, unless `--audio-multistreams` is used, all formats with an audio stream except the first one are ignored. For example, `-f bestvideo+best+bestaudio --video-multistreams --audio-multistreams` 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): - `filesize`: The number of bytes, if known in advance - `width`: Width of the video, if known - `height`: Height of the video, if known - `tbr`: Average bitrate of audio and video in KBit/s - `abr`: Average audio bitrate in KBit/s - `vbr`: Average video bitrate in KBit/s - `asr`: Audio sampling rate in Hertz - `fps`: Frame rate Also filtering work for comparisons `=` (equals), `^=` (starts with), `$=` (ends with), `*=` (contains), `~=` (matches regex) and following string meta fields: - `ext`: File extension - `acodec`: Name of the audio codec in use - `vcodec`: Name of the video codec in use - `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). The comparand of a string comparison needs to be quoted with either double or single quotes if it contains spaces or special characters other than `._-`. 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 website. 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 also use the filters with `all` to download all formats that satisfy the filter. For example, `-f "all[vcodec=none]"` selects all audio-only formats. Format selectors can also be grouped using parentheses, for example if you want to download the best pre-merged mp4 and webm formats with a height lower than 480 you can use `-f "(mp4,webm)[height<480]"`. ## 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: - `hasvid`: Gives priority to formats that has a video stream - `hasaud`: Gives priority to formats that has a audio stream - `ie_pref`: The format preference - `lang`: The language preference - `quality`: The quality of the format - `source`: The preference of the source - `proto`: Protocol used for download (`https`/`ftps` > `http`/`ftp` > `m3u8_native`/`m3u8` > `http_dash_segments`> `websocket_frag` > `mms`/`rtsp` > `f4f`/`f4m`) - `vcodec`: Video Codec (`av01` > `vp9.2` > `vp9` > `h265` > `h264` > `vp8` > `h263` > `theora` > other) - `acodec`: Audio Codec (`flac`/`alac` > `wav`/`aiff` > `opus` > `vorbis` > `aac` > `mp4a` > `mp3` > `eac3` > `ac3` > `dts` > other) - `codec`: Equivalent to `vcodec,acodec` - `vext`: Video Extension (`mp4` > `webm` > `flv` > other). If `--prefer-free-formats` is used, `webm` is preferred. - `aext`: Audio Extension (`m4a` > `aac` > `mp3` > `ogg` > `opus` > `webm` > other). If `--prefer-free-formats` is used, the order changes to `opus` > `ogg` > `webm` > `m4a` > `mp3` > `aac`. - `ext`: Equivalent to `vext,aext` - `filesize`: Exact filesize, if known in advance - `fs_approx`: Approximate filesize calculated from the manifests - `size`: Exact filesize if available, otherwise approximate filesize - `height`: Height of video - `width`: Width of video - `res`: Video resolution, calculated as the smallest dimension. - `fps`: Framerate of video - `hdr`: The dynamic range of the video (`DV` > `HDR12` > `HDR10+` > `HDR10` > `HLG` > `SDR`) - `tbr`: Total average bitrate in KBit/s - `vbr`: Average video bitrate in KBit/s - `abr`: Average audio bitrate in KBit/s - `br`: Equivalent to using `tbr,vbr,abr` - `asr`: Audio sample rate in Hz **Deprecation warning**: Many of these fields have (currently undocumented) aliases, that may be removed in a future version. It is recommended to use only the documented field names. All fields, unless specified otherwise, are sorted in descending order. To reverse this, prefix the field with a `+`. Eg: `+res` prefers format with the smallest resolution. Additionally, you can suffix a preferred value for the fields, separated 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 preferred 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` > `vp9.2` > `av01` > `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 `hasvid` and `ie_pref` are always given highest priority in sorting, irrespective of the user-defined order. This behaviour can be changed by using `--format-sort-force`. Apart from these, the default order used is: `lang,quality,res,fps,hdr:12,codec:vp9.2,size,br,asr,proto,ext,hasaud,source,id`. The extractors may override this default order, but they cannot override the user-provided order. Note that the default has `codec:vp9.2`; i.e. `av1` is not preferred. Similarly, the default for hdr is `hdr:12`; i.e. dolby vision is not preferred. These choices are made since DV and AV1 formats are not yet fully compatible with most devices. This may be changed in the future as more devices become capable of smoothly playing back these formats. 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 respects. 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 ```bash # Download and merge the best video-only format and the best audio-only format, # or download the best combined format if video-only format is not available $ yt-dlp -f "bv+ba/b" # Download best format that contains video, # and if it doesn't already have an audio stream, merge it with best audio-only format $ yt-dlp -f "bv*+ba/b" # Same as above $ yt-dlp # 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. $ yt-dlp -f "bv,ba" -o "%(title)s.f%(format_id)s.%(ext)s" # Download and merge the best format that has a video stream, # and all audio-only formats into one file $ yt-dlp -f "bv*+mergeall[vcodec=none]" --audio-multistreams # Download and merge the best format that has a video stream, # and the best 2 audio-only formats into one file $ yt-dlp -f "bv*+ba+ba.2" --audio-multistreams # The following examples show the old method (without -S) of format selection # and how to use -S to achieve a similar but (generally) better result # Download the worst video available (old method) $ yt-dlp -f "wv*+wa/w" # Download the best video available but with the smallest resolution $ yt-dlp -S "+res" # Download the smallest video available $ yt-dlp -S "+size,+br" # Download the best mp4 video available, or the best video if no mp4 available $ yt-dlp -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 ...) $ yt-dlp -S "ext" # Download the best video available but no better than 480p, # or the worst video if there is no video under 480p $ yt-dlp -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 $ yt-dlp -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 $ yt-dlp -S "res:480" # 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 $ yt-dlp -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 $ yt-dlp -f "b" -S "filesize:50M" # Download best video (that also has audio) that is closest in size to 50 MB $ yt-dlp -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 $ yt-dlp -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 ...) $ yt-dlp -S "proto" # Download the best video with either h264 or h265 codec, # or the best video if there is no such video $ yt-dlp -f "(bv*[vcodec~='^((he|a)vc|h26[45])']+ba) / (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 $ yt-dlp -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 $ yt-dlp -S "+codec:h264" # More complex examples # Download the best video no better than 720p preferring framerate greater than 30, # or the worst video (still preferring framerate greater than 30) if there is no such video $ yt-dlp -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, # preferring larger framerate for formats with the same resolution $ yt-dlp -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, # preferring better codec and then larger total bitrate for the same resolution $ yt-dlp -S "+res:480,codec,br" ``` # MODIFYING METADATA The metadata obtained by the extractors can be modified by using `--parse-metadata` and `--replace-in-metadata` `--replace-in-metadata FIELDS REGEX REPLACE` is used to replace text in any metadata field using [python regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax). [Backreferences](https://docs.python.org/3/library/re.html?highlight=backreferences#re.sub) can be used in the replace string for advanced use. The general syntax of `--parse-metadata FROM:TO` is to give the name of a field or an [output template](#output-template) to extract data from, and the format to interpret it as, separated by a colon `:`. Either a [python regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax) with named capture groups or a similar syntax to the [output template](#output-template) (only `%(field)s` formatting is supported) can be used for `TO`. The option can be used multiple times to parse and modify various fields. Note that any field created by this can be used in the [output template](#output-template) and will also affect the media file's metadata added when using `--add-metadata`. This option also has a few special uses: * You can download an additional URL based on the metadata of the currently downloaded video. To do this, set the field `additional_urls` to the URL that you want to download. Eg: `--parse-metadata "description:(?P<additional_urls>https?://www\.vimeo\.com/\d+)` will download the first vimeo video found in the description * You can use this to change the metadata that is embedded in the media file. To do this, set the value of the corresponding field with a `meta_` prefix. For example, any value you set to `meta_description` field will be added to the `description` field in the file. For example, you can use this to set a different "description" and "synopsis". To modify the metadata of individual streams, use the `meta<n>_` prefix (Eg: `meta1_language`). Any value set to the `meta_` field will overwrite all default values. **Note**: Metadata modification happens before format selection, post-extraction and other post-processing operations. Some fields may be added or changed during these steps, overriding your changes. For reference, these are the fields yt-dlp adds by default to the file metadata: Metadata fields | From :--------------------------|:------------------------------------------------ `title` | `track` or `title` `date` | `upload_date` `description`, `synopsis` | `description` `purl`, `comment` | `webpage_url` `track` | `track_number` `artist` | `artist`, `creator`, `uploader` or `uploader_id` `genre` | `genre` `album` | `album` `album_artist` | `album_artist` `disc` | `disc_number` `show` | `series` `season_number` | `season_number` `episode_id` | `episode` or `episode_id` `episode_sort` | `episode_number` `language` of each stream | the format's `language` **Note**: The file format may not support some of these fields ## Modifying metadata examples ```bash # Interpret the title as "Artist - Title" $ yt-dlp --parse-metadata "title:%(artist)s - %(title)s" # Regex example $ yt-dlp --parse-metadata "description:Artist - (?P<artist>.+)" # Set title as "Series name S01E05" $ yt-dlp --parse-metadata "%(series)s S%(season_number)02dE%(episode_number)02d:%(title)s" # Prioritize uploader as the "artist" field in video metadata $ yt-dlp --parse-metadata "%(uploader|)s:%(meta_artist)s" --add-metadata # Set "comment" field in video metadata using description instead of webpage_url, # handling multiple lines correctly $ yt-dlp --parse-metadata "description:(?s)(?P<meta_comment>.+)" --add-metadata # Remove "formats" field from the infojson by setting it to an empty string $ yt-dlp --parse-metadata ":(?P<formats>)" -j # Replace all spaces and "_" in title and uploader with a `-` $ yt-dlp --replace-in-metadata "title,uploader" "[ _]" "-" ``` # EXTRACTOR ARGUMENTS Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (semicolon) separated string of `ARG=VAL1,VAL2`. Eg: `--extractor-args "youtube:player-client=android_embedded,web;include_live_dash" --extractor-args "funimation:version=uncut"` The following extractors use this feature: #### youtube * `skip`: One or more of `hls`, `dash` or `translated_subs` to skip extraction of the m3u8 manifests, dash manifests and auto-translated subtitles respectively * `player_client`: Clients to extract video data from. The main clients are `web`, `android` and `ios` with variants `_music`, `_embedded`, `_embedscreen`, `_creator` (Eg: `web_embedded`); and `mweb` and `tv_embedded` (agegate bypass) with no variants. By default, `android,web` is used, but tv_embedded and creator variants are added as required for age-gated videos. Similarly the music variants are added for `music.youtube.com` urls. You can use `all` to use all the clients, and `default` for the default clients. * `player_skip`: Skip some network requests that are generally needed for robust extraction. One or more of `configs` (skip client configs), `webpage` (skip initial webpage), `js` (skip js player). While these options can help reduce the number of requests needed or avoid some rate-limiting, they could cause some issues. See [#860](https://github.com/yt-dlp/yt-dlp/pull/860) for more details * `include_live_dash`: Include live dash formats even without `--live-from-start` (These formats don't download properly) * `comment_sort`: `top` or `new` (default) - choose comment sorting mode (on YouTube's side) * `max_comments`: Limit the amount of comments to gather. Comma-separated list of integers representing `max-comments,max-parents,max-replies,max-replies-per-thread`. Default is `all,all,all,all` * E.g. `all,all,1000,10` will get a maximum of 1000 replies total, with up to 10 replies per thread. `1000,all,100` will get a maximum of 1000 comments, with a maximum of 100 replies total #### youtubetab (YouTube playlists, channels, feeds, etc.) * `skip`: One or more of `webpage` (skip initial webpage download), `authcheck` (allow the download of playlists requiring authentication when no initial webpage is downloaded. This may cause unwanted behavior, see [#1122](https://github.com/yt-dlp/yt-dlp/pull/1122) for more details) * `approximate_date`: Extract approximate `upload_date` in flat-playlist. This may cause date-based filters to be slightly off #### funimation * `language`: Languages to extract. Eg: `funimation:language=english,japanese` * `version`: The video version to extract - `uncut` or `simulcast` #### crunchyroll * `language`: Languages to extract. Eg: `crunchyroll:language=jaJp` * `hardsub`: Which hard-sub versions to extract. Eg: `crunchyroll:hardsub=None,enUS` #### crunchyrollbeta * `format`: Which stream type(s) to extract. Default is `adaptive_hls` Eg: `crunchyrollbeta:format=vo_adaptive_hls` * Potentially useful values include `adaptive_hls`, `adaptive_dash`, `vo_adaptive_hls`, `vo_adaptive_dash`, `download_hls`, `trailer_hls`, `trailer_dash` * `hardsub`: Preference order for which hardsub versions to extract. Default is `None` (no hardsubs). Eg: `crunchyrollbeta:hardsub=en-US,None` #### vikichannel * `video_types`: Types of videos to download - one or more of `episodes`, `movies`, `clips`, `trailers` #### niconico * `segment_duration`: Segment duration in milliseconds for HLS-DMC formats. Use it at your own risk since this feature **may result in your account termination.** #### youtubewebarchive * `check_all`: Try to check more at the cost of more requests. One or more of `thumbnails`, `captures` #### gamejolt * `comment_sort`: `hot` (default), `you` (cookies needed), `top`, `new` - choose comment sorting mode (on GameJolt's side) #### hotstar * `res`: resolution to ignore - one or more of `sd`, `hd`, `fhd` * `vcodec`: vcodec to ignore - one or more of `h264`, `h265`, `dvh265` * `dr`: dynamic range to ignore - one or more of `sdr`, `hdr10`, `dv` #### tiktok * `app_version`: App version to call mobile APIs with - should be set along with `manifest_app_version`. (e.g. `20.2.1`) * `manifest_app_version`: Numeric app version to call mobile APIs with. (e.g. `221`) #### rokfinchannel * `tab`: Which tab to download. One of `new`, `top`, `videos`, `podcasts`, `streams`, `stacks`. (E.g. `rokfinchannel:tab=streams`) NOTE: These options may be changed/removed in the future without concern for backward compatibility <!-- MANPAGE: MOVE "INSTALLATION" SECTION HERE --> # PLUGINS Plugins are loaded from `<root-dir>/ytdlp_plugins/<type>/__init__.py`; where `<root-dir>` is the directory of the binary (`<root-dir>/yt-dlp`), or the root directory of the module if you are running directly from source-code (`<root dir>/yt_dlp/__main__.py`). Plugins are currently not supported for the `pip` version Plugins can be of `<type>`s `extractor` or `postprocessor`. Extractor plugins do not need to be enabled from the CLI and are automatically invoked when the input URL is suitable for it. Postprocessor plugins can be invoked using `--use-postprocessor NAME`. See [ytdlp_plugins](ytdlp_plugins) for example plugins. Note that **all** plugins are imported even if not invoked, and that **there are no checks** performed on plugin code. Use plugins at your own risk and only if you trust the code If you are a plugin author, add [ytdlp-plugins](https://github.com/topics/ytdlp-plugins) as a topic to your repository for discoverability # EMBEDDING YT-DLP yt-dlp makes the best effort to be a good command-line program, and thus should be callable from any programming language. Your program should avoid parsing the normal stdout since they may change in future versions. Instead they should use options such as `-J`, `--print`, `--progress-template`, `--exec` etc to create console output that you can reliably reproduce and parse. From a Python program, you can embed yt-dlp in a more powerful fashion, like this: ```python from yt_dlp import YoutubeDL ydl_opts = {'format': 'bestaudio'} with YoutubeDL(ydl_opts) as ydl: ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc']) ``` Most likely, you'll want to use various options. For a list of options available, have a look at [`yt_dlp/YoutubeDL.py`](yt_dlp/YoutubeDL.py#L197). Here's a more complete example demonstrating various functionality: ```python import json import yt_dlp class MyLogger: def debug(self, msg): # For compatibility with youtube-dl, both debug and info are passed into debug # You can distinguish them by the prefix '[debug] ' if msg.startswith('[debug] '): pass else: self.info(msg) def info(self, msg): pass def warning(self, msg): pass def error(self, msg): print(msg) # ℹ️ See the docstring of yt_dlp.postprocessor.common.PostProcessor class MyCustomPP(yt_dlp.postprocessor.PostProcessor): # ℹ️ See docstring of yt_dlp.postprocessor.common.PostProcessor.run def run(self, info): self.to_screen('Doing stuff') return [], info # ℹ️ See "progress_hooks" in the docstring of yt_dlp.YoutubeDL def my_hook(d): if d['status'] == 'finished': print('Done downloading, now converting ...') def format_selector(ctx): """ Select the best video and the best audio that won't result in an mkv. This is just an example and does not handle all cases """ # formats are already sorted worst to best formats = ctx.get('formats')[::-1] # acodec='none' means there is no audio best_video = next(f for f in formats if f['vcodec'] != 'none' and f['acodec'] == 'none') # find compatible audio extension audio_ext = {'mp4': 'm4a', 'webm': 'webm'}[best_video['ext']] # vcodec='none' means there is no video best_audio = next(f for f in formats if ( f['acodec'] != 'none' and f['vcodec'] == 'none' and f['ext'] == audio_ext)) yield { # These are the minimum required fields for a merged format 'format_id': f'{best_video["format_id"]}+{best_audio["format_id"]}', 'ext': best_video['ext'], 'requested_formats': [best_video, best_audio], # Must be + separated list of protocols 'protocol': f'{best_video["protocol"]}+{best_audio["protocol"]}' } # ℹ️ See docstring of yt_dlp.YoutubeDL for a description of the options ydl_opts = { 'format': format_selector, 'postprocessors': [{ # Embed metadata in video using ffmpeg. # ℹ️ See yt_dlp.postprocessor.FFmpegMetadataPP for the arguments it accepts 'key': 'FFmpegMetadata', 'add_chapters': True, 'add_metadata': True, }], 'logger': MyLogger(), 'progress_hooks': [my_hook], # Add custom headers 'http_headers': {'Referer': 'https://www.google.com'} } # ℹ️ See the public functions in yt_dlp.YoutubeDL for for other available functions. # Eg: "ydl.download", "ydl.download_with_info_file" with yt_dlp.YoutubeDL(ydl_opts) as ydl: ydl.add_post_processor(MyCustomPP()) info = ydl.extract_info('https://www.youtube.com/watch?v=BaW_jenozKc') # ℹ️ ydl.sanitize_info makes the info json-serializable print(json.dumps(ydl.sanitize_info(info))) ``` **Tip**: If you are porting your code from youtube-dl to yt-dlp, one important point to look out for is that we do not guarantee the return value of `YoutubeDL.extract_info` to be json serializable, or even be a dictionary. It will be dictionary-like, but if you want to ensure it is a serializable dictionary, pass it through `YoutubeDL.sanitize_info` as shown in the example above <!-- MANPAGE: MOVE "NEW FEATURES" SECTION HERE --> # DEPRECATED OPTIONS These are all the deprecated options and the current alternative to achieve the same effect #### Almost redundant options While these options are almost the same as their new counterparts, there are some differences that prevents them being redundant -j, --dump-json --print "%()j" -F, --list-formats --print formats_table --list-thumbnails --print thumbnails_table --print playlist:thumbnails_table --list-subs --print automatic_captions_table --print subtitles_table #### Redundant options While these options are redundant, they are still expected to be used due to their ease of use --get-description --print description --get-duration --print duration_string --get-filename --print filename --get-format --print format --get-id --print id --get-thumbnail --print thumbnail -e, --get-title --print title -g, --get-url --print urls --match-title REGEX --match-filter "title ~= (?i)REGEX" --reject-title REGEX --match-filter "title !~= (?i)REGEX" --min-views COUNT --match-filter "view_count >=? COUNT" --max-views COUNT --match-filter "view_count <=? COUNT" --user-agent UA --add-header "User-Agent:UA" --referer URL --add-header "Referer:URL" #### Not recommended While these options still work, their use is not recommended since there are other alternatives to achieve the same --exec-before-download CMD --exec "before_dl:CMD" --no-exec-before-download --no-exec --all-formats -f all --all-subs --sub-langs all --write-subs --print-json -j --no-simulate --autonumber-size NUMBER Use string formatting. Eg: %(autonumber)03d --autonumber-start NUMBER Use internal field formatting like %(autonumber+NUMBER)s --id -o "%(id)s.%(ext)s" --metadata-from-title FORMAT --parse-metadata "%(title)s:FORMAT" --hls-prefer-native --downloader "m3u8:native" --hls-prefer-ffmpeg --downloader "m3u8:ffmpeg" --list-formats-old --compat-options list-formats (Alias: --no-list-formats-as-table) --list-formats-as-table --compat-options -list-formats [Default] (Alias: --no-list-formats-old) --youtube-skip-dash-manifest --extractor-args "youtube:skip=dash" (Alias: --no-youtube-include-dash-manifest) --youtube-skip-hls-manifest --extractor-args "youtube:skip=hls" (Alias: --no-youtube-include-hls-manifest) --youtube-include-dash-manifest Default (Alias: --no-youtube-skip-dash-manifest) --youtube-include-hls-manifest Default (Alias: --no-youtube-skip-hls-manifest) #### Developer options These options are not intended to be used by the end-user --test Download only part of video for testing extractors --youtube-print-sig-code For testing youtube signatures --allow-unplayable-formats List unplayable formats also --no-allow-unplayable-formats Default #### Old aliases These are aliases that are no longer documented for various reasons --avconv-location --ffmpeg-location --clean-infojson --clean-info-json --cn-verification-proxy URL --geo-verification-proxy URL --dump-headers --print-traffic --dump-intermediate-pages --dump-pages --force-write-download-archive --force-write-archive --load-info --load-info-json --no-clean-infojson --no-clean-info-json --no-split-tracks --no-split-chapters --no-write-srt --no-write-subs --prefer-unsecure --prefer-insecure --rate-limit RATE --limit-rate RATE --split-tracks --split-chapters --srt-lang LANGS --sub-langs LANGS --trim-file-names LENGTH --trim-filenames LENGTH --write-srt --write-subs --yes-overwrites --force-overwrites #### Sponskrub Options Support for [SponSkrub](https://github.com/faissaloo/SponSkrub) has been deprecated in favor of the `--sponsorblock` options --sponskrub --sponsorblock-mark all --no-sponskrub --no-sponsorblock --sponskrub-cut --sponsorblock-remove all --no-sponskrub-cut --sponsorblock-remove -all --sponskrub-force Not applicable --no-sponskrub-force Not applicable --sponskrub-location Not applicable --sponskrub-args Not applicable #### No longer supported These options may no longer work as intended --prefer-avconv avconv is not officially supported by yt-dlp (Alias: --no-prefer-ffmpeg) --prefer-ffmpeg Default (Alias: --no-prefer-avconv) -C, --call-home Not implemented --no-call-home Default --include-ads No longer supported --no-include-ads Default --write-annotations No supported site has annotations now --no-write-annotations Default #### Removed These options were deprecated since 2014 and have now been entirely removed -A, --auto-number -o "%(autonumber)s-%(id)s.%(ext)s" -t, --title -o "%(title)s-%(id)s.%(ext)s" -l, --literal -o accepts literal names # CONTRIBUTING See [CONTRIBUTING.md](CONTRIBUTING.md#contributing-to-yt-dlp) for instructions on [Opening an Issue](CONTRIBUTING.md#opening-an-issue) and [Contributing code to the project](CONTRIBUTING.md#developer-instructions) # MORE For FAQ see the [youtube-dl README](https://github.com/ytdl-org/youtube-dl#faq) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�14224003362�0015504�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/SizeOfImage.patch������������������������������������������������������0000664�0000000�0000000�00000000223�14224003362�0020664�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������BSDIFF402�������3��������D������BZh91AY&SYgm��DD`�@�� �!`ЊeH lMBZh91AY&SY>���� � M l %rE8P>BZh9rE8P���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/SizeOfImage_w.patch����������������������������������������������������0000664�0000000�0000000�00000000224�14224003362�0021213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������BSDIFF402�������4��������D������BZh91AY&SYk.��DH`�@�� �!`ЊeH  te`BZh91AY&SY֤?����� �0�R~ovrE8P֤?BZh9rE8P��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/bash-completion.in�����������������������������������������������������0000664�0000000�0000000�00000001500�14224003362�0021114�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������__yt_dlp() { local cur prev opts fileopts diropts keywords COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="{{flags}}" keywords=":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" fileopts="-a|--batch-file|--download-archive|--cookies|--load-info" diropts="--cache-dir" if [[ ${prev} =~ ${fileopts} ]]; then COMPREPLY=( $(compgen -f -- ${cur}) ) return 0 elif [[ ${prev} =~ ${diropts} ]]; then COMPREPLY=( $(compgen -d -- ${cur}) ) return 0 fi if [[ ${cur} =~ : ]]; then COMPREPLY=( $(compgen -W "${keywords}" -- ${cur}) ) return 0 elif [[ ${cur} == * ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi } complete -F __yt_dlp yt-dlp ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/bash-completion.py�����������������������������������������������������0000775�0000000�0000000�00000001533�14224003362�0021147�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals import os from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) import yt_dlp BASH_COMPLETION_FILE = "completions/bash/yt-dlp" BASH_COMPLETION_TEMPLATE = "devscripts/bash-completion.in" def build_completion(opt_parser): opts_flag = [] for group in opt_parser.option_groups: for option in group.option_list: # for every long flag opts_flag.append(option.get_opt_string()) with open(BASH_COMPLETION_TEMPLATE) as f: template = f.read() with open(BASH_COMPLETION_FILE, "w") as f: # just using the special char filled_template = template.replace("{{flags}}", " ".join(opts_flag)) f.write(filled_template) parser = yt_dlp.parseOpts()[0] build_completion(parser) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/buildserver.py���������������������������������������������������������0000664�0000000�0000000�00000033161�14224003362�0020410�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# UNUSED #!/usr/bin/python3 import argparse import ctypes import functools import shutil import subprocess import sys import tempfile import threading import traceback import os.path sys.path.insert(0, os.path.dirname(os.path.dirname((os.path.abspath(__file__))))) from yt_dlp.compat import ( compat_input, compat_http_server, compat_str, compat_urlparse, ) # These are not used outside of buildserver.py thus not in compat.py try: import winreg as compat_winreg except ImportError: # Python 2 import _winreg as compat_winreg try: import socketserver as compat_socketserver except ImportError: # Python 2 import SocketServer as compat_socketserver class BuildHTTPServer(compat_socketserver.ThreadingMixIn, compat_http_server.HTTPServer): allow_reuse_address = True advapi32 = ctypes.windll.advapi32 SC_MANAGER_ALL_ACCESS = 0xf003f SC_MANAGER_CREATE_SERVICE = 0x02 SERVICE_WIN32_OWN_PROCESS = 0x10 SERVICE_AUTO_START = 0x2 SERVICE_ERROR_NORMAL = 0x1 DELETE = 0x00010000 SERVICE_STATUS_START_PENDING = 0x00000002 SERVICE_STATUS_RUNNING = 0x00000004 SERVICE_ACCEPT_STOP = 0x1 SVCNAME = 'youtubedl_builder' LPTSTR = ctypes.c_wchar_p START_CALLBACK = ctypes.WINFUNCTYPE(None, ctypes.c_int, ctypes.POINTER(LPTSTR)) class SERVICE_TABLE_ENTRY(ctypes.Structure): _fields_ = [ ('lpServiceName', LPTSTR), ('lpServiceProc', START_CALLBACK) ] HandlerEx = ctypes.WINFUNCTYPE( ctypes.c_int, # return ctypes.c_int, # dwControl ctypes.c_int, # dwEventType ctypes.c_void_p, # lpEventData, ctypes.c_void_p, # lpContext, ) def _ctypes_array(c_type, py_array): ar = (c_type * len(py_array))() ar[:] = py_array return ar def win_OpenSCManager(): res = advapi32.OpenSCManagerW(None, None, SC_MANAGER_ALL_ACCESS) if not res: raise Exception('Opening service manager failed - ' 'are you running this as administrator?') return res def win_install_service(service_name, cmdline): manager = win_OpenSCManager() try: h = advapi32.CreateServiceW( manager, service_name, None, SC_MANAGER_CREATE_SERVICE, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, cmdline, None, None, None, None, None) if not h: raise OSError('Service creation failed: %s' % ctypes.FormatError()) advapi32.CloseServiceHandle(h) finally: advapi32.CloseServiceHandle(manager) def win_uninstall_service(service_name): manager = win_OpenSCManager() try: h = advapi32.OpenServiceW(manager, service_name, DELETE) if not h: raise OSError('Could not find service %s: %s' % ( service_name, ctypes.FormatError())) try: if not advapi32.DeleteService(h): raise OSError('Deletion failed: %s' % ctypes.FormatError()) finally: advapi32.CloseServiceHandle(h) finally: advapi32.CloseServiceHandle(manager) def win_service_report_event(service_name, msg, is_error=True): with open('C:/sshkeys/log', 'a', encoding='utf-8') as f: f.write(msg + '\n') event_log = advapi32.RegisterEventSourceW(None, service_name) if not event_log: raise OSError('Could not report event: %s' % ctypes.FormatError()) try: type_id = 0x0001 if is_error else 0x0004 event_id = 0xc0000000 if is_error else 0x40000000 lines = _ctypes_array(LPTSTR, [msg]) if not advapi32.ReportEventW( event_log, type_id, 0, event_id, None, len(lines), 0, lines, None): raise OSError('Event reporting failed: %s' % ctypes.FormatError()) finally: advapi32.DeregisterEventSource(event_log) def win_service_handler(stop_event, *args): try: raise ValueError('Handler called with args ' + repr(args)) TODO except Exception as e: tb = traceback.format_exc() msg = str(e) + '\n' + tb win_service_report_event(service_name, msg, is_error=True) raise def win_service_set_status(handle, status_code): svcStatus = SERVICE_STATUS() svcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS svcStatus.dwCurrentState = status_code svcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP svcStatus.dwServiceSpecificExitCode = 0 if not advapi32.SetServiceStatus(handle, ctypes.byref(svcStatus)): raise OSError('SetServiceStatus failed: %r' % ctypes.FormatError()) def win_service_main(service_name, real_main, argc, argv_raw): try: # args = [argv_raw[i].value for i in range(argc)] stop_event = threading.Event() handler = HandlerEx(functools.partial(stop_event, win_service_handler)) h = advapi32.RegisterServiceCtrlHandlerExW(service_name, handler, None) if not h: raise OSError('Handler registration failed: %s' % ctypes.FormatError()) TODO except Exception as e: tb = traceback.format_exc() msg = str(e) + '\n' + tb win_service_report_event(service_name, msg, is_error=True) raise def win_service_start(service_name, real_main): try: cb = START_CALLBACK( functools.partial(win_service_main, service_name, real_main)) dispatch_table = _ctypes_array(SERVICE_TABLE_ENTRY, [ SERVICE_TABLE_ENTRY( service_name, cb ), SERVICE_TABLE_ENTRY(None, ctypes.cast(None, START_CALLBACK)) ]) if not advapi32.StartServiceCtrlDispatcherW(dispatch_table): raise OSError('ctypes start failed: %s' % ctypes.FormatError()) except Exception as e: tb = traceback.format_exc() msg = str(e) + '\n' + tb win_service_report_event(service_name, msg, is_error=True) raise def main(args=None): parser = argparse.ArgumentParser() parser.add_argument('-i', '--install', action='store_const', dest='action', const='install', help='Launch at Windows startup') parser.add_argument('-u', '--uninstall', action='store_const', dest='action', const='uninstall', help='Remove Windows service') parser.add_argument('-s', '--service', action='store_const', dest='action', const='service', help='Run as a Windows service') parser.add_argument('-b', '--bind', metavar='<host:port>', action='store', default='0.0.0.0:8142', help='Bind to host:port (default %default)') options = parser.parse_args(args=args) if options.action == 'install': fn = os.path.abspath(__file__).replace('v:', '\\\\vboxsrv\\vbox') cmdline = '%s %s -s -b %s' % (sys.executable, fn, options.bind) win_install_service(SVCNAME, cmdline) return if options.action == 'uninstall': win_uninstall_service(SVCNAME) return if options.action == 'service': win_service_start(SVCNAME, main) return host, port_str = options.bind.split(':') port = int(port_str) print('Listening on %s:%d' % (host, port)) srv = BuildHTTPServer((host, port), BuildHTTPRequestHandler) thr = threading.Thread(target=srv.serve_forever) thr.start() compat_input('Press ENTER to shut down') srv.shutdown() thr.join() def rmtree(path): for name in os.listdir(path): fname = os.path.join(path, name) if os.path.isdir(fname): rmtree(fname) else: os.chmod(fname, 0o666) os.remove(fname) os.rmdir(path) class BuildError(Exception): def __init__(self, output, code=500): self.output = output self.code = code def __str__(self): return self.output class HTTPError(BuildError): pass class PythonBuilder(object): def __init__(self, **kwargs): python_version = kwargs.pop('python', '3.4') python_path = None for node in ('Wow6432Node\\', ''): try: key = compat_winreg.OpenKey( compat_winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\%sPython\PythonCore\%s\InstallPath' % (node, python_version)) try: python_path, _ = compat_winreg.QueryValueEx(key, '') finally: compat_winreg.CloseKey(key) break except Exception: pass if not python_path: raise BuildError('No such Python version: %s' % python_version) self.pythonPath = python_path super(PythonBuilder, self).__init__(**kwargs) class GITInfoBuilder(object): def __init__(self, **kwargs): try: self.user, self.repoName = kwargs['path'][:2] self.rev = kwargs.pop('rev') except ValueError: raise BuildError('Invalid path') except KeyError as e: raise BuildError('Missing mandatory parameter "%s"' % e.args[0]) path = os.path.join(os.environ['APPDATA'], 'Build archive', self.repoName, self.user) if not os.path.exists(path): os.makedirs(path) self.basePath = tempfile.mkdtemp(dir=path) self.buildPath = os.path.join(self.basePath, 'build') super(GITInfoBuilder, self).__init__(**kwargs) class GITBuilder(GITInfoBuilder): def build(self): try: subprocess.check_output(['git', 'clone', 'git://github.com/%s/%s.git' % (self.user, self.repoName), self.buildPath]) subprocess.check_output(['git', 'checkout', self.rev], cwd=self.buildPath) except subprocess.CalledProcessError as e: raise BuildError(e.output) super(GITBuilder, self).build() class YoutubeDLBuilder(object): authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile', 'ytdl-org'] def __init__(self, **kwargs): if self.repoName != 'yt-dlp': raise BuildError('Invalid repository "%s"' % self.repoName) if self.user not in self.authorizedUsers: raise HTTPError('Unauthorized user "%s"' % self.user, 401) super(YoutubeDLBuilder, self).__init__(**kwargs) def build(self): try: proc = subprocess.Popen([os.path.join(self.pythonPath, 'python.exe'), 'setup.py', 'py2exe'], stdin=subprocess.PIPE, cwd=self.buildPath) proc.wait() #subprocess.check_output([os.path.join(self.pythonPath, 'python.exe'), 'setup.py', 'py2exe'], # cwd=self.buildPath) except subprocess.CalledProcessError as e: raise BuildError(e.output) super(YoutubeDLBuilder, self).build() class DownloadBuilder(object): def __init__(self, **kwargs): self.handler = kwargs.pop('handler') self.srcPath = os.path.join(self.buildPath, *tuple(kwargs['path'][2:])) self.srcPath = os.path.abspath(os.path.normpath(self.srcPath)) if not self.srcPath.startswith(self.buildPath): raise HTTPError(self.srcPath, 401) super(DownloadBuilder, self).__init__(**kwargs) def build(self): if not os.path.exists(self.srcPath): raise HTTPError('No such file', 404) if os.path.isdir(self.srcPath): raise HTTPError('Is a directory: %s' % self.srcPath, 401) self.handler.send_response(200) self.handler.send_header('Content-Type', 'application/octet-stream') self.handler.send_header('Content-Disposition', 'attachment; filename=%s' % os.path.split(self.srcPath)[-1]) self.handler.send_header('Content-Length', str(os.stat(self.srcPath).st_size)) self.handler.end_headers() with open(self.srcPath, 'rb') as src: shutil.copyfileobj(src, self.handler.wfile) super(DownloadBuilder, self).build() class CleanupTempDir(object): def build(self): try: rmtree(self.basePath) except Exception as e: print('WARNING deleting "%s": %s' % (self.basePath, e)) super(CleanupTempDir, self).build() class Null(object): def __init__(self, **kwargs): pass def start(self): pass def close(self): pass def build(self): pass class Builder(PythonBuilder, GITBuilder, YoutubeDLBuilder, DownloadBuilder, CleanupTempDir, Null): pass class BuildHTTPRequestHandler(compat_http_server.BaseHTTPRequestHandler): actionDict = {'build': Builder, 'download': Builder} # They're the same, no more caching. def do_GET(self): path = compat_urlparse.urlparse(self.path) paramDict = dict([(key, value[0]) for key, value in compat_urlparse.parse_qs(path.query).items()]) action, _, path = path.path.strip('/').partition('/') if path: path = path.split('/') if action in self.actionDict: try: builder = self.actionDict[action](path=path, handler=self, **paramDict) builder.start() try: builder.build() finally: builder.close() except BuildError as e: self.send_response(e.code) msg = compat_str(e).encode('UTF-8') self.send_header('Content-Type', 'text/plain; charset=UTF-8') self.send_header('Content-Length', len(msg)) self.end_headers() self.wfile.write(msg) else: self.send_response(500, 'Unknown build method "%s"' % action) else: self.send_response(500, 'Malformed URL') if __name__ == '__main__': main() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/check-porn.py����������������������������������������������������������0000664�0000000�0000000�00000003574�14224003362�0020120�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals """ This script employs a VERY basic heuristic ('porn' in webpage.lower()) to check if we are not 'age_limit' tagging some porn site A second approach implemented relies on a list of porn domains, to activate it pass the list filename as the only argument """ # Allow direct execution import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import gettestcases from yt_dlp.utils import compat_urllib_parse_urlparse from yt_dlp.utils import compat_urllib_request if len(sys.argv) > 1: METHOD = 'LIST' LIST = open(sys.argv[1]).read().decode('utf8').strip() else: METHOD = 'EURISTIC' for test in gettestcases(): if METHOD == 'EURISTIC': try: webpage = compat_urllib_request.urlopen(test['url'], timeout=10).read() except Exception: print('\nFail: {0}'.format(test['name'])) continue webpage = webpage.decode('utf8', 'replace') RESULT = 'porn' in webpage.lower() elif METHOD == 'LIST': domain = compat_urllib_parse_urlparse(test['url']).netloc if not domain: print('\nFail: {0}'.format(test['name'])) continue domain = '.'.join(domain.split('.')[-2:]) RESULT = ('.' + domain + '\n' in LIST or '\n' + domain + '\n' in LIST) if RESULT and ('info_dict' not in test or 'age_limit' not in test['info_dict'] or test['info_dict']['age_limit'] != 18): print('\nPotential missing age_limit check: {0}'.format(test['name'])) elif not RESULT and ('info_dict' in test and 'age_limit' in test['info_dict'] and test['info_dict']['age_limit'] == 18): print('\nPotential false negative: {0}'.format(test['name'])) else: sys.stdout.write('.') sys.stdout.flush() print() ������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/create-github-release.py�����������������������������������������������0000664�0000000�0000000�00000007027�14224003362�0022225�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Unused #!/usr/bin/env python3 from __future__ import unicode_literals import io import json import mimetypes import netrc import optparse import os import re import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from yt_dlp.compat import ( compat_basestring, compat_getpass, compat_print, compat_urllib_request, ) from yt_dlp.utils import ( make_HTTPS_handler, sanitized_Request, ) class GitHubReleaser(object): _API_URL = 'https://api.github.com/repos/ytdl-org/youtube-dl/releases' _UPLOADS_URL = 'https://uploads.github.com/repos/ytdl-org/youtube-dl/releases/%s/assets?name=%s' _NETRC_MACHINE = 'github.com' def __init__(self, debuglevel=0): self._init_github_account() https_handler = make_HTTPS_handler({}, debuglevel=debuglevel) self._opener = compat_urllib_request.build_opener(https_handler) def _init_github_account(self): try: info = netrc.netrc().authenticators(self._NETRC_MACHINE) if info is not None: self._token = info[2] compat_print('Using GitHub credentials found in .netrc...') return else: compat_print('No GitHub credentials found in .netrc') except (IOError, netrc.NetrcParseError): compat_print('Unable to parse .netrc') self._token = compat_getpass( 'Type your GitHub PAT (personal access token) and press [Return]: ') def _call(self, req): if isinstance(req, compat_basestring): req = sanitized_Request(req) req.add_header('Authorization', 'token %s' % self._token) response = self._opener.open(req).read().decode('utf-8') return json.loads(response) def list_releases(self): return self._call(self._API_URL) def create_release(self, tag_name, name=None, body='', draft=False, prerelease=False): data = { 'tag_name': tag_name, 'target_commitish': 'master', 'name': name, 'body': body, 'draft': draft, 'prerelease': prerelease, } req = sanitized_Request(self._API_URL, json.dumps(data).encode('utf-8')) return self._call(req) def create_asset(self, release_id, asset): asset_name = os.path.basename(asset) url = self._UPLOADS_URL % (release_id, asset_name) # Our files are small enough to be loaded directly into memory. data = open(asset, 'rb').read() req = sanitized_Request(url, data) mime_type, _ = mimetypes.guess_type(asset_name) req.add_header('Content-Type', mime_type or 'application/octet-stream') return self._call(req) def main(): parser = optparse.OptionParser(usage='%prog CHANGELOG VERSION BUILDPATH') options, args = parser.parse_args() if len(args) != 3: parser.error('Expected a version and a build directory') changelog_file, version, build_path = args with io.open(changelog_file, encoding='utf-8') as inf: changelog = inf.read() mobj = re.search(r'(?s)version %s\n{2}(.+?)\n{3}' % version, changelog) body = mobj.group(1) if mobj else '' releaser = GitHubReleaser() new_release = releaser.create_release( version, name='yt-dlp %s' % version, body=body) release_id = new_release['id'] for asset in os.listdir(build_path): compat_print('Uploading %s...' % asset) releaser.create_asset(release_id, os.path.join(build_path, asset)) if __name__ == '__main__': main() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/fish-completion.in�����������������������������������������������������0000664�0000000�0000000�00000000176�14224003362�0021140�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ {{commands}} complete --command yt-dlp --arguments ":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/fish-completion.py�����������������������������������������������������0000775�0000000�0000000�00000003212�14224003362�0021157�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals import optparse import os from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) import yt_dlp from yt_dlp.utils import shell_quote FISH_COMPLETION_FILE = 'completions/fish/yt-dlp.fish' FISH_COMPLETION_TEMPLATE = 'devscripts/fish-completion.in' EXTRA_ARGS = { 'remux-video': ['--arguments', 'mp4 mkv', '--exclusive'], 'recode-video': ['--arguments', 'mp4 flv ogg webm mkv', '--exclusive'], # Options that need a file parameter 'download-archive': ['--require-parameter'], 'cookies': ['--require-parameter'], 'load-info': ['--require-parameter'], 'batch-file': ['--require-parameter'], } def build_completion(opt_parser): commands = [] for group in opt_parser.option_groups: for option in group.option_list: long_option = option.get_opt_string().strip('-') complete_cmd = ['complete', '--command', 'yt-dlp', '--long-option', long_option] if option._short_opts: complete_cmd += ['--short-option', option._short_opts[0].strip('-')] if option.help != optparse.SUPPRESS_HELP: complete_cmd += ['--description', option.help] complete_cmd.extend(EXTRA_ARGS.get(long_option, [])) commands.append(shell_quote(complete_cmd)) with open(FISH_COMPLETION_TEMPLATE) as f: template = f.read() filled_template = template.replace('{{commands}}', '\n'.join(commands)) with open(FISH_COMPLETION_FILE, 'w') as f: f.write(filled_template) parser = yt_dlp.parseOpts()[0] build_completion(parser) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/generate_aes_testdata.py�����������������������������������������������0000664�0000000�0000000�00000002200�14224003362�0022363�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals import codecs import subprocess import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from yt_dlp.utils import intlist_to_bytes from yt_dlp.aes import aes_encrypt, key_expansion secret_msg = b'Secret message goes here' def hex_str(int_list): return codecs.encode(intlist_to_bytes(int_list), 'hex') def openssl_encode(algo, key, iv): cmd = ['openssl', 'enc', '-e', '-' + algo, '-K', hex_str(key), '-iv', hex_str(iv)] prog = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) out, _ = prog.communicate(secret_msg) return out iv = key = [0x20, 0x15] + 14 * [0] r = openssl_encode('aes-128-cbc', key, iv) print('aes_cbc_decrypt') print(repr(r)) password = key new_key = aes_encrypt(password, key_expansion(password)) r = openssl_encode('aes-128-ctr', new_key, iv) print('aes_decrypt_text 16') print(repr(r)) password = key + 16 * [0] new_key = aes_encrypt(password, key_expansion(password)) * (32 // 16) r = openssl_encode('aes-256-ctr', new_key, iv) print('aes_decrypt_text 32') print(repr(r)) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/gh-pages.unused/�������������������������������������������������������0000775�0000000�0000000�00000000000�14224003362�0020501�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/gh-pages.unused/add-version.py�����������������������������������������0000664�0000000�0000000�00000002206�14224003362�0023266�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals import json import sys import hashlib import os.path if len(sys.argv) <= 1: print('Specify the version number as parameter') sys.exit() version = sys.argv[1] with open('update/LATEST_VERSION', 'w') as f: f.write(version) versions_info = json.load(open('update/versions.json')) if 'signature' in versions_info: del versions_info['signature'] new_version = {} filenames = { 'bin': 'yt-dlp', 'exe': 'yt-dlp.exe', 'tar': 'yt-dlp-%s.tar.gz' % version} build_dir = os.path.join('..', '..', 'build', version) for key, filename in filenames.items(): url = 'https://yt-dl.org/downloads/%s/%s' % (version, filename) fn = os.path.join(build_dir, filename) with open(fn, 'rb') as f: data = f.read() if not data: raise ValueError('File %s is empty!' % fn) sha256sum = hashlib.sha256(data).hexdigest() new_version[key] = (url, sha256sum) versions_info['versions'][version] = new_version versions_info['latest'] = version with open('update/versions.json', 'w') as jsonf: json.dump(versions_info, jsonf, indent=4, sort_keys=True) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/gh-pages.unused/generate-download.py�����������������������������������0000664�0000000�0000000�00000001567�14224003362�0024463�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals import json versions_info = json.load(open('update/versions.json')) version = versions_info['latest'] version_dict = versions_info['versions'][version] # Read template page with open('download.html.in', 'r', encoding='utf-8') as tmplf: template = tmplf.read() template = template.replace('@PROGRAM_VERSION@', version) template = template.replace('@PROGRAM_URL@', version_dict['bin'][0]) template = template.replace('@PROGRAM_SHA256SUM@', version_dict['bin'][1]) template = template.replace('@EXE_URL@', version_dict['exe'][0]) template = template.replace('@EXE_SHA256SUM@', version_dict['exe'][1]) template = template.replace('@TAR_URL@', version_dict['tar'][0]) template = template.replace('@TAR_SHA256SUM@', version_dict['tar'][1]) with open('download.html', 'w', encoding='utf-8') as dlf: dlf.write(template) �����������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/gh-pages.unused/sign-versions.py���������������������������������������0000664�0000000�0000000�00000001615�14224003362�0023664�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals, with_statement import rsa import json from binascii import hexlify try: input = raw_input except NameError: pass versions_info = json.load(open('update/versions.json')) if 'signature' in versions_info: del versions_info['signature'] print('Enter the PKCS1 private key, followed by a blank line:') privkey = b'' while True: try: line = input() except EOFError: break if line == '': break privkey += line.encode('ascii') + b'\n' privkey = rsa.PrivateKey.load_pkcs1(privkey) signature = hexlify(rsa.pkcs1.sign(json.dumps(versions_info, sort_keys=True).encode('utf-8'), privkey, 'SHA-256')).decode() print('signature: ' + signature) versions_info['signature'] = signature with open('update/versions.json', 'w') as versionsf: json.dump(versions_info, versionsf, indent=4, sort_keys=True) �������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/gh-pages.unused/update-copyright.py������������������������������������0000664�0000000�0000000�00000001147�14224003362�0024346�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 # coding: utf-8 from __future__ import with_statement, unicode_literals import datetime import glob import io # For Python 2 compatibility import os import re year = str(datetime.datetime.now().year) for fn in glob.glob('*.html*'): with io.open(fn, encoding='utf-8') as f: content = f.read() newc = re.sub(r'(?P<copyright>Copyright © 2011-)(?P<year>[0-9]{4})', 'Copyright © 2011-' + year, content) if content != newc: tmpFn = fn + '.part' with io.open(tmpFn, 'wt', encoding='utf-8') as outf: outf.write(newc) os.rename(tmpFn, fn) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yt-dlp-2022.04.08/devscripts/gh-pages.unused/update-feed.py�����������������������������������������0000664�0000000�0000000�00000004405�14224003362�0023241�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from __future__ import unicode_literals import datetime import io import json import textwrap atom_template = textwrap.dedent("""\ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <link rel="self" href="http://ytdl-org.github.io/youtube-dl/update/releases.atom" /> <title>yt-dlp releases https://yt-dl.org/feed/yt-dlp-updates-feed @TIMESTAMP@ @ENTRIES@ """) entry_template = textwrap.dedent(""" https://yt-dl.org/feed/yt-dlp-updates-feed/yt-dlp-@VERSION@ New version @VERSION@ The yt-dlp maintainers @TIMESTAMP@ """) now = datetime.datetime.now() now_iso = now.isoformat() + 'Z' atom_template = atom_template.replace('@TIMESTAMP@', now_iso) versions_info = json.load(open('update/versions.json')) versions = list(versions_info['versions'].keys()) versions.sort() entries = [] for v in versions: fields = v.split('.') year, month, day = map(int, fields[:3]) faked = 0 patchlevel = 0 while True: try: datetime.date(year, month, day) except ValueError: day -= 1 faked += 1 assert day > 0 continue break if len(fields) >= 4: try: patchlevel = int(fields[3]) except ValueError: patchlevel = 1 timestamp = '%04d-%02d-%02dT00:%02d:%02dZ' % (year, month, day, faked, patchlevel) entry = entry_template.replace('@TIMESTAMP@', timestamp) entry = entry.replace('@VERSION@', v) entries.append(entry) entries_str = textwrap.indent(''.join(entries), '\t') atom_template = atom_template.replace('@ENTRIES@', entries_str) with io.open('update/releases.atom', 'w', encoding='utf-8') as atom_file: atom_file.write(atom_template) yt-dlp-2022.04.08/devscripts/gh-pages.unused/update-sites.py000066400000000000000000000020061422400336200234600ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import sys import os import textwrap # We must be able to import yt_dlp sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) import yt_dlp def main(): with open('supportedsites.html.in', 'r', encoding='utf-8') as tmplf: template = tmplf.read() ie_htmls = [] for ie in yt_dlp.list_extractors(age_limit=None): ie_html = '{}'.format(ie.IE_NAME) ie_desc = getattr(ie, 'IE_DESC', None) if ie_desc is False: continue elif ie_desc is not None: ie_html += ': {}'.format(ie.IE_DESC) if not ie.working(): ie_html += ' (Currently broken)' ie_htmls.append('
  • {}
  • '.format(ie_html)) template = template.replace('@SITES@', textwrap.indent('\n'.join(ie_htmls), '\t')) with open('supportedsites.html', 'w', encoding='utf-8') as sitesf: sitesf.write(template) if __name__ == '__main__': main() yt-dlp-2022.04.08/devscripts/lazy_load_template.py000066400000000000000000000017251422400336200217340ustar00rootroot00000000000000# coding: utf-8 import re from ..utils import bug_reports_message, write_string class LazyLoadMetaClass(type): def __getattr__(cls, name): if '_real_class' not in cls.__dict__: write_string( f'WARNING: Falling back to normal extractor since lazy extractor ' f'{cls.__name__} does not have attribute {name}{bug_reports_message()}') return getattr(cls._get_real_class(), name) class LazyLoadExtractor(metaclass=LazyLoadMetaClass): _module = None _WORKING = True @classmethod def _get_real_class(cls): if '_real_class' not in cls.__dict__: mod = __import__(cls._module, fromlist=(cls.__name__,)) cls._real_class = getattr(mod, cls.__name__) return cls._real_class def __new__(cls, *args, **kwargs): real_cls = cls._get_real_class() instance = real_cls.__new__(real_cls) instance.__init__(*args, **kwargs) return instance yt-dlp-2022.04.08/devscripts/logo.ico000066400000000000000000001201231422400336200171370ustar00rootroot00000000000000 %f@@ (@00 ($^  (ۂ (  (+PNG  IHDR\rfsRGBgAMA a pHYsodIDATx^ U$, `BIgt ! (! a fD3AvpPP $ $"ks~e]:BwխzܥW1cƌ-&L0{wi?oNf0ikkuGSSӖvfj B415f?ZZZIwM8Y߮0!D`I 9b!D!H/fף=885^T~:~߶ߤ!D fe_@oA D\6`O=5F )B@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!ƏwM&f?SNs`9E#\ƙ7v;03ZZܸrڌ=+P&eCDq$ Ffz*wíui5߿6oFYH1fZ[}zfFv#<@!)Ca'" Bί5zq3`."^hZ?gxyj+7ь6]Z1cHe`Ɨ-nո]O7-:O!^׻5<'`ԏ^We6 Z3?>dNp7v˷3Xa. vHD;md-r^|1 MX 9ux3@VYd67|Q hG KB`O۽N6[f?1a`בb;˓( f_yt6s|?2M~^ѣ϶z+C&b#:VǍFFY?wذ$sƎ y-̺9EK@\[n-7FP pQim{*~---s:ҚR.F8G 2ǚ /_OkC|mmu-_ @x}+\w}U nݢEs==\j!8TD}3c&g~K8μΣ֯õf׿b Gȇd~۷þ+3 MQәq~%5DGػ=b[{ }MAe?#o@v{CqÆ K<ߵ1B-~_2یw}xesj+vdھ{ U&-`aGC3 T ZϚ.7O(Wwi1d Ց.aܞOP|/ٻ]fGDٻ-ݘTRp?éٯ]]ynڴinG{ |@=*~c*f]*Iefdb]#6  68ogiL Wf_M32}p{ |6;>2f?I9EXۻ}:#)g}?yǭ>%A±o=4ѲƯ AHx5<\^)>B+7$`LD|"P ӟ_`}UqJ >Zs :@0,X&Z%&~ГCu.̀n^ǟB2&L<_AlKyތLUݩ<*N_`gqFj˗:*Ա'=/n}Zf̡=3x Y=`L@b`J/J QSN9=39;\}n=qABRQ3<[ ~s${֎O|fؔYg 4ẗ$~Q%/1w]~W_MMܱj*wg&q< *-'p_*o!rf\e;a^8`}<ο*>/2sA\  7zԤw}={v 17wFǍ|}]ȒRlf.(~8נXӻ;%|ϻ)@#3g[tij厗_~]znɉpݷ~;pzp-)Q<d7,UN,`ǻПuxW>h7$gf"dߡJ) @JTΓ裏s&~U##\ɾVqc{([ͥe[ nƹ 7w B@ c;v'hd0iR{Y7z/gC @qO.\^|ԤK,q3gLl F|kjV >߾cU:Z< IߙvO ʄd~gC Ll X |? !0?\_2$ct7 #Y|ف/N͹&nTyXRչZ1"l~%3|3A{>bѽp7r2Cl7ߟt` 0CsS1U`yi;sѩW3 L-6 M1X 3}]< 3;+'\ @OwOo9@Wǘwt7=R =8#1"SD4 |_Y>^sgWmNz &XeKP䨚$= Ra\Fyk`Nʸ%7OW^<@Qq1 Eǧ)l^C^JvS#6Yg%U {*q M~abXDد,, ds s+'Lw?pw}f];*%DYW`lipG?hb񧀠d?h]2ĆMB}{ P~E33x_X`/3fkƽIwuW4_ʃ7-M.)'uKi{dx.S\2 = \;X 4`Iy睗Px10] o T!0)@*> fHa0aMp3搵 KEQ(F et7 -pO8bŊԌa)STj?~a#@W q^ lcahG6>lEt}fYIC|bH\t&͚5tM;w'Um\r*2s  -I\L$@QU;cH_zk /qLs9')V392R`3TƝGe1 e` &mg˦]n„h,r`*e!HiO;.M^{핈I `T<بi 9 ("+4 ?Ѯi`hZsu8@$ݦ stA~]9X Oˁ-XE+P?A ]էZ2[+:`7{ =(8mWNg߱jd3Xڛ׬Yq]vYCHKA!&W˞,{\ fs^̘C4%2W|vL* OdY9j`>=ө;70[BG`nJdz_9y\c}2 Zк؝Y։0W膮6D JEwJ!id 4 R@_m|Ԅl..CٞU uF>efE"k:}!`M_y,.A_yy6!vo rE~^ƠR@^ ?-Zs:"{cs,@emz}qZIWN{%^ݧ̊,ڙؐ%}ȃ MJ C=t}>o _Gdp_d+un#N2+`O ,/2 uf@1AXY^w}G0()ԓXT.@}&]`8 *Cp8+fx'ݼya,+ZDKb&jKg1O߹Eք! 4MSfD_)K{!E tz&twZ_›LEm**)@~s|dFC_|.|Lצ`7ࢣ27yvzd]דuCȬv#=ϹM' nf7,^f㔍Iep<@c /0YO WVh;H641Z%HV2p}xӸ)3d3)Z*-φzR(kѺCJX6,dXآ* zv! 1$83V dJUE*/~,~=T)Wp @2,מ?[%`lՆI\r#XP֫gC@ ȑ\xкX,oՎ0BWZVIKǘZA?>{ *9)R}njoU0.U}q`.+]a$Ɵ=S#`t4VbmKN09溇E_a-va X&sdgBa!ܖz$kn`;ϱ9 ;D4Q Y; ,MEi5ke[.ܼv3| )KTe̶֭~-& |u'lJ'!Vhn_y%BTu#FT>}z.`U;.{z0Df;ˆasBαh?c^Z$*x@Xm(}vxd2 Y<9ٻE~1yFmVVMV\ߦ?̙t|ϛ-Cs(M?]>8!i?X07wx-ѻm$$9+ơ ѭ)IOCPCP26t pʋ @E @9pqYgy0˲6+r0wO50hHphUc=VP2{ a;T&-[̭^0͙EQ}+a0о Ym @LD)۸.$ V֏lHhng{7SVxU@__ |ub#j)E%2 Ѱ$#͐ |I hX Sg0eA |pؠ͘J=C| 6vmޘHDB /8*@\=ň@4,8 [(f$aa?6jTakا" +#PJiĥ #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@1!"F DH #"b$BD@A^" !+~(ս??{g2a>DF?As8q",I u{.5 ommfba8~D@K/3f̐9B]cwKjC_!h\<57+SS?8Ʉv-_k)P03^mKb#5W3:c IENDB`(@ &&&!((()))((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))'''''')))((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()**++++**(()(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()) X U)) (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((!!! ((((((((((((((((((((((((((((((((((((((((((((((((((((((++++(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((BBBGGGGGGGGGGGGGGGGGGGGGDDD)))'''((((((((((((((((((((((((((((((((((((((((((((((((**\ ** (('((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((&&&&&&...$$$((&****))$((')) )) ))!((())$)) )) )) )) )) )) ++$$?&&1)) ****((%(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((&&&&&&...%% **!""L S''.**##D##C$$>))%&&4##C##C##C##C##C##C$$>''.##B** S!!N))&**(()(((((((((((((((((((((((((((((((((((((((((((((((((((((()))((((((((((((;;;?????????????????????<<<))&))#))$''0 q S++(()(((((((((((((((((((((((((((((((((((((((((((((((()))ooo```""")))((("""!!!!!!!!!!!!!!!!!!!!!"""**l%%;((,%%<)) ((((((((((((((((((((((((((((((((((((((((((((((((NNN---'''(((((((((((((((((((((((((((++ef##Dz**~r++((((((((((((((((((((((((((((((((((((((((((((((((UUUjjj)))(((((((((((((((((((((++.... --++-- W.. ++`))!..f))$((&((((((((((((((((((((((((((((((((((((((((((((()))&&&???)))((((((((((((((((((++++++x++(((++++)) ##B''0**&&5%%9))"(((((((((((((((((((((((((((((((((((((((((((((((()))$$$<<%%;''/""I!!O** ""I""G**((((((((((((((((((((((((((((((((($$$<<<,,,)))((((((((())"%%7^00**-- n** ,, ,,))$t++((((((((((((((((((((((((((((((((()))!!!MMMGGG (((((((((((&))$..f&&5++ S##C,,l''1++ ++(((((((((((((((((((((((((((((((((((()))!!! FFFnnn((((((((((((++ ..##C!!M++%%9a,,!!N##D.. ++((((((((((((((((((((((((((((((((()))555...%%%((((((((((((++%%:Xl++))%,,&&4,, **(('((((((((((((((((((((((((((((((yyyOOO$$$)))(((((((((((()) $$@++++ ,,))"++(((((((((((((((((((((((((((((((((~~~((((((((((((((((((((((()**[ ++++ **** ##E)) ((((((((((((((((((((((((((((((((('''(((777%%%)))(((((((((((((((((((((((((()**))#''0--  ))",,l'',))$((&((())#**''0))&)) (()((((((((((((((((((((((((((((((((((((&&&"""(((((((((((((((((((((((((((((((((((((((((&))$++j(()##C)) ((&((%((&(('))$((&(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((**""I$$>b++((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((('((*""I""J''/$$<""J""J""J&&5))%(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((('****((&))"******))%(()((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))((('''((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((''')))((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))(((r( @ '''((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((''')))(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()**++((&(()((((((((((((((((((((((((((((((((((((((())))))((((((((((((((((((((()) \''/((%(((((((((((((((((((((((((((((((((((((((###^^^xxxxxxxxx``a$$"********))"++++..""J--**((((((((((((((((((((((((((())) i]\ R""Fmhdkug!!Q**((((((((((((((((((((('''$$$wwwIII !!! %%z t^**((((((((((((((((((&&&###"""''''''**&&4&&2!!N++ ''. ++(((((((((((((((((((((&&&[[[...$$$(((++''0g""H))".. .. ))&((&(((((((((((((((((('''MMM000$$$(((**[i Rm,, .. ((&&&6))#(((((((((((((((&&&###&&&###(((((())%(()..++z((*))$((((((((((((((('''$$$UUU$$$)))(((((((())) %%9h //%%9%%8h T)) ((((((((((((((((((((())))))((((((((((((((((()))"++-- ""Lc++++**++**(()(((((((((((((((((((((((((((((((((((((((((((((((((((((((((**sW W**(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()**++))#++++))#(()(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((('''(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((%%%)''')))(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((***'''(0 '''((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((('**((%(()((((((((((((((((((((((((((())))))((((((((((((((&''-X''0((&((((((((((((((((((((((((%%%!!!dddffh##++++**++,,** _.. **(()(((((((((((((((***+++ooouujck !!N**(((((((((((($$$111 u}** (('((((((((((((###777$$$&&&++ |g-- V ''-$$=))"((((((((('''&&&fff###'''++**  S!!K**((((((((($$$222]]]'''((())#&&2 ''. ((+ ((*((%(((((((((((('''((((((((((()))#++** y**++++**((&(()((((((((((((((('''(((((((((((((((((((('))$^ Qre(()(('((((((((((((((((((((((((((((((((((((((((((((((((((((((**)) ++**((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((('''g((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))((((  '''(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())%((&(((((((((((((((((()))**'((&((&))$''/(()((%((((((((()))%%%[[[^^[!!$'',''.))!}++))$(()((($$$>>>ggg???\\WFFT  ''.))%(((&&&'''7zti**(((###;;;___""!)) u X**((('''000---)))((&)) ^~))!&&5((%((((((((('''&&&(((((((((((&((&%%9##B&&3))#))$(((((((((((((((((((((((((((((((('))#))"))%(()((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((('''(((((((((((((((((((((((((((((((((((((((((('''yt-dlp-2022.04.08/devscripts/make_contributing.py000077500000000000000000000014631422400336200215710ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import io import optparse import re def main(): return # This is unused in yt-dlp parser = optparse.OptionParser(usage='%prog INFILE OUTFILE') options, args = parser.parse_args() if len(args) != 2: parser.error('Expected an input and an output filename') infile, outfile = args with io.open(infile, encoding='utf-8') as inf: readme = inf.read() bug_text = re.search( r'(?s)#\s*BUGS\s*[^\n]*\s*(.*?)#\s*COPYRIGHT', readme).group(1) dev_text = re.search( r'(?s)(#\s*DEVELOPER INSTRUCTIONS.*?)#\s*EMBEDDING yt-dlp', readme).group(1) out = bug_text + dev_text with io.open(outfile, 'w', encoding='utf-8') as outf: outf.write(out) if __name__ == '__main__': main() yt-dlp-2022.04.08/devscripts/make_issue_template.py000066400000000000000000000014201422400336200220730ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import io import optparse def main(): parser = optparse.OptionParser(usage='%prog INFILE OUTFILE') options, args = parser.parse_args() if len(args) != 2: parser.error('Expected an input and an output filename') infile, outfile = args with io.open(infile, encoding='utf-8') as inf: issue_template_tmpl = inf.read() # Get the version from yt_dlp/version.py without importing the package exec(compile(open('yt_dlp/version.py').read(), 'yt_dlp/version.py', 'exec')) out = issue_template_tmpl % {'version': locals()['__version__']} with io.open(outfile, 'w', encoding='utf-8') as outf: outf.write(out) if __name__ == '__main__': main() yt-dlp-2022.04.08/devscripts/make_lazy_extractors.py000066400000000000000000000061711422400336200223150ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals, print_function from inspect import getsource import io import os from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) lazy_extractors_filename = sys.argv[1] if len(sys.argv) > 1 else 'yt_dlp/extractor/lazy_extractors.py' if os.path.exists(lazy_extractors_filename): os.remove(lazy_extractors_filename) # Block plugins from loading plugins_dirname = 'ytdlp_plugins' plugins_blocked_dirname = 'ytdlp_plugins_blocked' if os.path.exists(plugins_dirname): os.rename(plugins_dirname, plugins_blocked_dirname) from yt_dlp.extractor import _ALL_CLASSES from yt_dlp.extractor.common import InfoExtractor, SearchInfoExtractor if os.path.exists(plugins_blocked_dirname): os.rename(plugins_blocked_dirname, plugins_dirname) with open('devscripts/lazy_load_template.py', 'rt') as f: module_template = f.read() CLASS_PROPERTIES = ['ie_key', 'working', '_match_valid_url', 'suitable', '_match_id', 'get_temp_id'] module_contents = [ module_template, *[getsource(getattr(InfoExtractor, k)) for k in CLASS_PROPERTIES], '\nclass LazyLoadSearchExtractor(LazyLoadExtractor):\n pass\n'] ie_template = ''' class {name}({bases}): _module = '{module}' ''' def get_base_name(base): if base is InfoExtractor: return 'LazyLoadExtractor' elif base is SearchInfoExtractor: return 'LazyLoadSearchExtractor' else: return base.__name__ def build_lazy_ie(ie, name): s = ie_template.format( name=name, bases=', '.join(map(get_base_name, ie.__bases__)), module=ie.__module__) valid_url = getattr(ie, '_VALID_URL', None) if not valid_url and hasattr(ie, '_make_valid_url'): valid_url = ie._make_valid_url() if valid_url: s += f' _VALID_URL = {valid_url!r}\n' if not ie._WORKING: s += ' _WORKING = False\n' if ie.suitable.__func__ is not InfoExtractor.suitable.__func__: s += f'\n{getsource(ie.suitable)}' return s # find the correct sorting and add the required base classes so that subclasses # can be correctly created classes = _ALL_CLASSES[:-1] ordered_cls = [] while classes: for c in classes[:]: bases = set(c.__bases__) - set((object, InfoExtractor, SearchInfoExtractor)) stop = False for b in bases: if b not in classes and b not in ordered_cls: if b.__name__ == 'GenericIE': exit() classes.insert(0, b) stop = True if stop: break if all(b in ordered_cls for b in bases): ordered_cls.append(c) classes.remove(c) break ordered_cls.append(_ALL_CLASSES[-1]) names = [] for ie in ordered_cls: name = ie.__name__ src = build_lazy_ie(ie, name) module_contents.append(src) if ie in _ALL_CLASSES: names.append(name) module_contents.append( '\n_ALL_CLASSES = [{0}]'.format(', '.join(names))) module_src = '\n'.join(module_contents) + '\n' with io.open(lazy_extractors_filename, 'wt', encoding='utf-8') as f: f.write(module_src) yt-dlp-2022.04.08/devscripts/make_readme.py000077500000000000000000000013641422400336200203170ustar00rootroot00000000000000#!/usr/bin/env python3 # yt-dlp --help | make_readme.py # This must be run in a console of correct width from __future__ import unicode_literals import io import sys import re README_FILE = 'README.md' helptext = sys.stdin.read() if isinstance(helptext, bytes): helptext = helptext.decode('utf-8') with io.open(README_FILE, encoding='utf-8') as f: oldreadme = f.read() header = oldreadme[:oldreadme.index('## General Options:')] footer = oldreadme[oldreadme.index('# CONFIGURATION'):] options = helptext[helptext.index(' General Options:'):] options = re.sub(r'(?m)^ (\w.+)$', r'## \1', options) options = options + '\n' with io.open(README_FILE, 'w', encoding='utf-8') as f: f.write(header) f.write(options) f.write(footer) yt-dlp-2022.04.08/devscripts/make_supportedsites.py000066400000000000000000000023411422400336200221500ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import io import optparse import os import sys # Import yt_dlp ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') sys.path.insert(0, ROOT_DIR) import yt_dlp def main(): parser = optparse.OptionParser(usage='%prog OUTFILE.md') options, args = parser.parse_args() if len(args) != 1: parser.error('Expected an output filename') outfile, = args def gen_ies_md(ies): for ie in ies: ie_md = '**{0}**'.format(ie.IE_NAME) if ie.IE_DESC is False: continue if ie.IE_DESC is not None: ie_md += ': {0}'.format(ie.IE_DESC) search_key = getattr(ie, 'SEARCH_KEY', None) if search_key is not None: ie_md += f'; "{ie.SEARCH_KEY}:" prefix' if not ie.working(): ie_md += ' (Currently broken)' yield ie_md ies = sorted(yt_dlp.gen_extractors(), key=lambda i: i.IE_NAME.lower()) out = '# Supported sites\n' + ''.join( ' - ' + md + '\n' for md in gen_ies_md(ies)) with io.open(outfile, 'w', encoding='utf-8') as outf: outf.write(out) if __name__ == '__main__': main() yt-dlp-2022.04.08/devscripts/posix-locale.sh000077500000000000000000000002641422400336200204440ustar00rootroot00000000000000 # source this file in your shell to get a POSIX locale (which will break many programs, but that's kind of the point) export LC_ALL=POSIX export LANG=POSIX export LANGUAGE=POSIX yt-dlp-2022.04.08/devscripts/prepare_manpage.py000066400000000000000000000057211422400336200212110ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import io import optparse import os.path import re ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) README_FILE = os.path.join(ROOT_DIR, 'README.md') PREFIX = r'''%yt-dlp(1) # NAME yt\-dlp \- A youtube-dl fork with additional features and patches # SYNOPSIS **yt-dlp** \[OPTIONS\] URL [URL...] # DESCRIPTION ''' def main(): parser = optparse.OptionParser(usage='%prog OUTFILE.md') options, args = parser.parse_args() if len(args) != 1: parser.error('Expected an output filename') outfile, = args with io.open(README_FILE, encoding='utf-8') as f: readme = f.read() readme = filter_excluded_sections(readme) readme = move_sections(readme) readme = filter_options(readme) with io.open(outfile, 'w', encoding='utf-8') as outf: outf.write(PREFIX + readme) def filter_excluded_sections(readme): EXCLUDED_SECTION_BEGIN_STRING = re.escape('') EXCLUDED_SECTION_END_STRING = re.escape('') return re.sub( rf'(?s){EXCLUDED_SECTION_BEGIN_STRING}.+?{EXCLUDED_SECTION_END_STRING}\n', '', readme) def move_sections(readme): MOVE_TAG_TEMPLATE = '' sections = re.findall(r'(?m)^%s$' % ( re.escape(MOVE_TAG_TEMPLATE).replace(r'\%', '%') % '(.+)'), readme) for section_name in sections: move_tag = MOVE_TAG_TEMPLATE % section_name if readme.count(move_tag) > 1: raise Exception(f'There is more than one occurrence of "{move_tag}". This is unexpected') sections = re.findall(rf'(?sm)(^# {re.escape(section_name)}.+?)(?=^# )', readme) if len(sections) < 1: raise Exception(f'The section {section_name} does not exist') elif len(sections) > 1: raise Exception(f'There are multiple occurrences of section {section_name}, this is unhandled') readme = readme.replace(sections[0], '', 1).replace(move_tag, sections[0], 1) return readme def filter_options(readme): section = re.search(r'(?sm)^# USAGE AND OPTIONS\n.+?(?=^# )', readme).group(0) options = '# OPTIONS\n' for line in section.split('\n')[1:]: mobj = re.fullmatch(r'''(?x) \s{4}(?P-(?:,\s|[^\s])+) (?:\s(?P(?:[^\s]|\s(?!\s))+))? (\s{2,}(?P.+))? ''', line) if not mobj: options += f'{line.lstrip()}\n' continue option, metavar, description = mobj.group('opt', 'meta', 'desc') # Pandoc's definition_lists. See http://pandoc.org/README.html option = f'{option} *{metavar}*' if metavar else option description = f'{description}\n' if description else '' options += f'\n{option}\n: {description}' continue return readme.replace(section, options, 1) if __name__ == '__main__': main() yt-dlp-2022.04.08/devscripts/release.sh000077500000000000000000000116411422400336200174660ustar00rootroot00000000000000# Unused #!/bin/bash # IMPORTANT: the following assumptions are made # * the GH repo is on the origin remote # * the gh-pages branch is named so locally # * the git config user.signingkey is properly set # You will need # pip install coverage nose rsa wheel # TODO # release notes # make hash on local files set -e skip_tests=true gpg_sign_commits="" buildserver='localhost:8142' while true do case "$1" in --run-tests) skip_tests=false shift ;; --gpg-sign-commits|-S) gpg_sign_commits="-S" shift ;; --buildserver) buildserver="$2" shift 2 ;; --*) echo "ERROR: unknown option $1" exit 1 ;; *) break ;; esac done if [ -z "$1" ]; then echo "ERROR: specify version number like this: $0 1994.09.06"; exit 1; fi version="$1" major_version=$(echo "$version" | sed -n 's#^\([0-9]*\.[0-9]*\.[0-9]*\).*#\1#p') if test "$major_version" '!=' "$(date '+%Y.%m.%d')"; then echo "$version does not start with today's date!" exit 1 fi if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi if [ ! -z "`git status --porcelain | grep -v CHANGELOG`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi useless_files=$(find yt_dlp -type f -not -name '*.py') if [ ! -z "$useless_files" ]; then echo "ERROR: Non-.py files in yt_dlp: $useless_files"; exit 1; fi if [ ! -f "updates_key.pem" ]; then echo 'ERROR: updates_key.pem missing'; exit 1; fi if ! type pandoc >/dev/null 2>/dev/null; then echo 'ERROR: pandoc is missing'; exit 1; fi if ! python3 -c 'import rsa' 2>/dev/null; then echo 'ERROR: python3-rsa is missing'; exit 1; fi if ! python3 -c 'import wheel' 2>/dev/null; then echo 'ERROR: wheel is missing'; exit 1; fi read -p "Is Changelog up to date? (y/n) " -n 1 if [[ ! $REPLY =~ ^[Yy]$ ]]; then exit 1; fi /bin/echo -e "\n### First of all, testing..." make clean if $skip_tests ; then echo 'SKIPPING TESTS' else nosetests --verbose --with-coverage --cover-package=yt_dlp --cover-html test --stop || exit 1 fi /bin/echo -e "\n### Changing version in version.py..." sed -i "s/__version__ = '.*'/__version__ = '$version'/" yt_dlp/version.py /bin/echo -e "\n### Changing version in Changelog..." sed -i "s//$version/" Changelog.md /bin/echo -e "\n### Committing documentation, templates and yt_dlp/version.py..." make README.md CONTRIBUTING.md issuetemplates supportedsites git add README.md CONTRIBUTING.md .github/ISSUE_TEMPLATE/1_broken_site.md .github/ISSUE_TEMPLATE/2_site_support_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md .github/ISSUE_TEMPLATE/4_bug_report.md .github/ISSUE_TEMPLATE/5_feature_request.md .github/ISSUE_TEMPLATE/6_question.md docs/supportedsites.md yt_dlp/version.py Changelog.md git commit $gpg_sign_commits -m "release $version" /bin/echo -e "\n### Now tagging, signing and pushing..." git tag -s -m "Release $version" "$version" git show "$version" read -p "Is it good, can I push? (y/n) " -n 1 if [[ ! $REPLY =~ ^[Yy]$ ]]; then exit 1; fi echo MASTER=$(git rev-parse --abbrev-ref HEAD) git push origin $MASTER:master git push origin "$version" /bin/echo -e "\n### OK, now it is time to build the binaries..." REV=$(git rev-parse HEAD) make yt-dlp yt-dlp.tar.gz read -p "VM running? (y/n) " -n 1 wget "http://$buildserver/build/ytdl-org/youtube-dl/yt-dlp.exe?rev=$REV" -O yt-dlp.exe mkdir -p "build/$version" mv yt-dlp yt-dlp.exe "build/$version" mv yt-dlp.tar.gz "build/$version/yt-dlp-$version.tar.gz" RELEASE_FILES="yt-dlp yt-dlp.exe yt-dlp-$version.tar.gz" (cd build/$version/ && md5sum $RELEASE_FILES > MD5SUMS) (cd build/$version/ && sha1sum $RELEASE_FILES > SHA1SUMS) (cd build/$version/ && sha256sum $RELEASE_FILES > SHA2-256SUMS) (cd build/$version/ && sha512sum $RELEASE_FILES > SHA2-512SUMS) /bin/echo -e "\n### Signing and uploading the new binaries to GitHub..." for f in $RELEASE_FILES; do gpg --passphrase-repeat 5 --detach-sig "build/$version/$f"; done ROOT=$(pwd) python devscripts/create-github-release.py Changelog.md $version "$ROOT/build/$version" ssh ytdl@yt-dl.org "sh html/update_latest.sh $version" /bin/echo -e "\n### Now switching to gh-pages..." git clone --branch gh-pages --single-branch . build/gh-pages ( set -e ORIGIN_URL=$(git config --get remote.origin.url) cd build/gh-pages "$ROOT/devscripts/gh-pages/add-version.py" $version "$ROOT/devscripts/gh-pages/update-feed.py" "$ROOT/devscripts/gh-pages/sign-versions.py" < "$ROOT/updates_key.pem" "$ROOT/devscripts/gh-pages/generate-download.py" "$ROOT/devscripts/gh-pages/update-copyright.py" "$ROOT/devscripts/gh-pages/update-sites.py" git add *.html *.html.in update git commit $gpg_sign_commits -m "release $version" git push "$ROOT" gh-pages git push "$ORIGIN_URL" gh-pages ) rm -rf build make pypi-files echo "Uploading to PyPi ..." python setup.py sdist bdist_wheel upload make clean /bin/echo -e "\n### DONE!" yt-dlp-2022.04.08/devscripts/run_tests.bat000066400000000000000000000004761422400336200202310ustar00rootroot00000000000000@setlocal @echo off cd /d %~dp0.. if ["%~1"]==[""] ( set "test_set="test"" ) else if ["%~1"]==["core"] ( set "test_set="-m not download"" ) else if ["%~1"]==["download"] ( set "test_set="-m "download"" ) else ( echo.Invalid test type "%~1". Use "core" ^| "download" exit /b 1 ) pytest %test_set% yt-dlp-2022.04.08/devscripts/run_tests.sh000077500000000000000000000004251422400336200200720ustar00rootroot00000000000000#!/bin/sh if [ -z $1 ]; then test_set='test' elif [ $1 = 'core' ]; then test_set="-m not download" elif [ $1 = 'download' ]; then test_set="-m download" else echo 'Invalid test type "'$1'". Use "core" | "download"' exit 1 fi python3 -m pytest "$test_set" yt-dlp-2022.04.08/devscripts/show-downloads-statistics.py000066400000000000000000000024741422400336200232250ustar00rootroot00000000000000# Unused #!/usr/bin/env python3 from __future__ import unicode_literals import itertools import json import os import re import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from yt_dlp.compat import ( compat_print, compat_urllib_request, ) from yt_dlp.utils import format_bytes def format_size(bytes): return '%s (%d bytes)' % (format_bytes(bytes), bytes) total_bytes = 0 for page in itertools.count(1): releases = json.loads(compat_urllib_request.urlopen( 'https://api.github.com/repos/ytdl-org/youtube-dl/releases?page=%s' % page ).read().decode('utf-8')) if not releases: break for release in releases: compat_print(release['name']) for asset in release['assets']: asset_name = asset['name'] total_bytes += asset['download_count'] * asset['size'] if all(not re.match(p, asset_name) for p in ( r'^yt-dlp$', r'^yt-dlp-\d{4}\.\d{2}\.\d{2}(?:\.\d+)?\.tar\.gz$', r'^yt-dlp\.exe$')): continue compat_print( ' %s size: %s downloads: %d' % (asset_name, format_size(asset['size']), asset['download_count'])) compat_print('total downloads traffic: %s' % format_size(total_bytes)) yt-dlp-2022.04.08/devscripts/update-formulae.py000066400000000000000000000021151422400336200211470ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import json import os import re import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from yt_dlp.compat import compat_urllib_request # usage: python3 ./devscripts/update-formulae.py # version can be either 0-aligned (yt-dlp version) or normalized (PyPl version) filename, version = sys.argv[1:] normalized_version = '.'.join(str(int(x)) for x in version.split('.')) pypi_release = json.loads(compat_urllib_request.urlopen( 'https://pypi.org/pypi/yt-dlp/%s/json' % normalized_version ).read().decode('utf-8')) tarball_file = next(x for x in pypi_release['urls'] if x['filename'].endswith('.tar.gz')) sha256sum = tarball_file['digests']['sha256'] url = tarball_file['url'] with open(filename, 'r') as r: formulae_text = r.read() formulae_text = re.sub(r'sha256 "[0-9a-f]*?"', 'sha256 "%s"' % sha256sum, formulae_text) formulae_text = re.sub(r'url "[^"]*?"', 'url "%s"' % url, formulae_text) with open(filename, 'w') as w: w.write(formulae_text) yt-dlp-2022.04.08/devscripts/update-version.py000066400000000000000000000021611422400336200210230ustar00rootroot00000000000000#!/usr/bin/env python3 from datetime import datetime import sys import subprocess with open('yt_dlp/version.py', 'rt') as f: exec(compile(f.read(), 'yt_dlp/version.py', 'exec')) old_version = locals()['__version__'] old_version_list = old_version.split('.') old_ver = '.'.join(old_version_list[:3]) old_rev = old_version_list[3] if len(old_version_list) > 3 else '' ver = datetime.utcnow().strftime("%Y.%m.%d") rev = (sys.argv[1:] or [''])[0] # Use first argument, if present as revision number if not rev: rev = str(int(old_rev or 0) + 1) if old_ver == ver else '' VERSION = '.'.join((ver, rev)) if rev else ver try: sp = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], stdout=subprocess.PIPE) GIT_HEAD = sp.communicate()[0].decode().strip() or None except Exception: GIT_HEAD = None VERSION_FILE = f'''\ # Autogenerated by devscripts/update-version.py __version__ = {VERSION!r} RELEASE_GIT_HEAD = {GIT_HEAD!r} ''' with open('yt_dlp/version.py', 'wt') as f: f.write(VERSION_FILE) print('::set-output name=ytdlp_version::' + VERSION) print(f'\nVersion = {VERSION}, Git HEAD = {GIT_HEAD}') yt-dlp-2022.04.08/devscripts/wine-py2exe.sh000077500000000000000000000036631422400336200202270ustar00rootroot00000000000000# UNUSED #!/bin/bash # Run with as parameter a setup.py that works in the current directory # e.g. no os.chdir() # It will run twice, the first time will crash set -e SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" if [ ! -d wine-py2exe ]; then sudo apt-get install wine1.3 axel bsdiff mkdir wine-py2exe cd wine-py2exe export WINEPREFIX=`pwd` axel -a "http://www.python.org/ftp/python/2.7/python-2.7.msi" axel -a "http://downloads.sourceforge.net/project/py2exe/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe" #axel -a "http://winetricks.org/winetricks" # http://appdb.winehq.org/objectManager.php?sClass=version&iId=21957 echo "Follow python setup on screen" wine msiexec /i python-2.7.msi echo "Follow py2exe setup on screen" wine py2exe-0.6.9.win32-py2.7.exe #echo "Follow Microsoft Visual C++ 2008 Redistributable Package setup on screen" #bash winetricks vcrun2008 rm py2exe-0.6.9.win32-py2.7.exe rm python-2.7.msi #rm winetricks # http://bugs.winehq.org/show_bug.cgi?id=3591 mv drive_c/Python27/Lib/site-packages/py2exe/run.exe drive_c/Python27/Lib/site-packages/py2exe/run.exe.backup bspatch drive_c/Python27/Lib/site-packages/py2exe/run.exe.backup drive_c/Python27/Lib/site-packages/py2exe/run.exe "$SCRIPT_DIR/SizeOfImage.patch" mv drive_c/Python27/Lib/site-packages/py2exe/run_w.exe drive_c/Python27/Lib/site-packages/py2exe/run_w.exe.backup bspatch drive_c/Python27/Lib/site-packages/py2exe/run_w.exe.backup drive_c/Python27/Lib/site-packages/py2exe/run_w.exe "$SCRIPT_DIR/SizeOfImage_w.patch" cd - else export WINEPREFIX="$( cd wine-py2exe && pwd )" fi wine "C:\\Python27\\python.exe" "$1" py2exe > "py2exe.log" 2>&1 || true echo '# Copying python27.dll' >> "py2exe.log" cp "$WINEPREFIX/drive_c/windows/system32/python27.dll" build/bdist.win32/winexe/bundle-2.7/ wine "C:\\Python27\\python.exe" "$1" py2exe >> "py2exe.log" 2>&1 yt-dlp-2022.04.08/devscripts/zsh-completion.in000066400000000000000000000015401422400336200210070ustar00rootroot00000000000000#compdef yt-dlp __yt_dlp() { local curcontext="$curcontext" fileopts diropts cur prev typeset -A opt_args fileopts="{{fileopts}}" diropts="{{diropts}}" cur=$words[CURRENT] case $cur in :) _arguments '*: :(::ytfavorites ::ytrecommended ::ytsubscriptions ::ytwatchlater ::ythistory)' ;; *) prev=$words[CURRENT-1] if [[ ${prev} =~ ${fileopts} ]]; then _path_files elif [[ ${prev} =~ ${diropts} ]]; then _path_files -/ elif [[ ${prev} == "--remux-video" ]]; then _arguments '*: :(mp4 mkv)' elif [[ ${prev} == "--recode-video" ]]; then _arguments '*: :(mp4 flv ogg webm mkv)' else _arguments '*: :({{flags}})' fi ;; esac } __yt_dlpyt-dlp-2022.04.08/devscripts/zsh-completion.py000077500000000000000000000025521422400336200210400ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals import os from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) import yt_dlp ZSH_COMPLETION_FILE = "completions/zsh/_yt-dlp" ZSH_COMPLETION_TEMPLATE = "devscripts/zsh-completion.in" def build_completion(opt_parser): opts = [opt for group in opt_parser.option_groups for opt in group.option_list] opts_file = [opt for opt in opts if opt.metavar == "FILE"] opts_dir = [opt for opt in opts if opt.metavar == "DIR"] fileopts = [] for opt in opts_file: if opt._short_opts: fileopts.extend(opt._short_opts) if opt._long_opts: fileopts.extend(opt._long_opts) diropts = [] for opt in opts_dir: if opt._short_opts: diropts.extend(opt._short_opts) if opt._long_opts: diropts.extend(opt._long_opts) flags = [opt.get_opt_string() for opt in opts] with open(ZSH_COMPLETION_TEMPLATE) as f: template = f.read() template = template.replace("{{fileopts}}", "|".join(fileopts)) template = template.replace("{{diropts}}", "|".join(diropts)) template = template.replace("{{flags}}", " ".join(flags)) with open(ZSH_COMPLETION_FILE, "w") as f: f.write(template) parser = yt_dlp.parseOpts()[0] build_completion(parser) yt-dlp-2022.04.08/pyinst.py000066400000000000000000000105211422400336200152150ustar00rootroot00000000000000#!/usr/bin/env python3 # coding: utf-8 import os import platform import sys from PyInstaller.utils.hooks import collect_submodules OS_NAME = platform.system() if OS_NAME == 'Windows': from PyInstaller.utils.win32.versioninfo import ( VarStruct, VarFileInfo, StringStruct, StringTable, StringFileInfo, FixedFileInfo, VSVersionInfo, SetVersion, ) elif OS_NAME == 'Darwin': pass else: raise Exception('{OS_NAME} is not supported') ARCH = platform.architecture()[0][:2] def main(): opts = parse_options() version = read_version() suffix = '_macos' if OS_NAME == 'Darwin' else '_x86' if ARCH == '32' else '' final_file = 'dist/%syt-dlp%s%s' % ( 'yt-dlp/' if '--onedir' in opts else '', suffix, '.exe' if OS_NAME == 'Windows' else '') print(f'Building yt-dlp v{version} {ARCH}bit for {OS_NAME} with options {opts}') print('Remember to update the version using "devscripts/update-version.py"') if not os.path.isfile('yt_dlp/extractor/lazy_extractors.py'): print('WARNING: Building without lazy_extractors. Run ' '"devscripts/make_lazy_extractors.py" to build lazy extractors', file=sys.stderr) print(f'Destination: {final_file}\n') opts = [ f'--name=yt-dlp{suffix}', '--icon=devscripts/logo.ico', '--upx-exclude=vcruntime140.dll', '--noconfirm', *dependency_options(), *opts, 'yt_dlp/__main__.py', ] print(f'Running PyInstaller with {opts}') import PyInstaller.__main__ PyInstaller.__main__.run(opts) set_version_info(final_file, version) def parse_options(): # Compatability with older arguments opts = sys.argv[1:] if opts[0:1] in (['32'], ['64']): if ARCH != opts[0]: raise Exception(f'{opts[0]}bit executable cannot be built on a {ARCH}bit system') opts = opts[1:] return opts or ['--onefile'] def read_version(): exec(compile(open('yt_dlp/version.py').read(), 'yt_dlp/version.py', 'exec')) return locals()['__version__'] def version_to_list(version): version_list = version.split('.') return list(map(int, version_list)) + [0] * (4 - len(version_list)) def dependency_options(): dependencies = [pycryptodome_module(), 'mutagen', 'brotli', 'certifi'] + collect_submodules('websockets') excluded_modules = ['test', 'ytdlp_plugins', 'youtube-dl', 'youtube-dlc'] yield from (f'--hidden-import={module}' for module in dependencies) yield from (f'--exclude-module={module}' for module in excluded_modules) def pycryptodome_module(): try: import Cryptodome # noqa: F401 except ImportError: try: import Crypto # noqa: F401 print('WARNING: Using Crypto since Cryptodome is not available. ' 'Install with: pip install pycryptodomex', file=sys.stderr) return 'Crypto' except ImportError: pass return 'Cryptodome' def set_version_info(exe, version): if OS_NAME == 'Windows': windows_set_version(exe, version) def windows_set_version(exe, version): version_list = version_to_list(version) suffix = '_x86' if ARCH == '32' else '' SetVersion(exe, VSVersionInfo( ffi=FixedFileInfo( filevers=version_list, prodvers=version_list, mask=0x3F, flags=0x0, OS=0x4, fileType=0x1, subtype=0x0, date=(0, 0), ), kids=[ StringFileInfo([StringTable('040904B0', [ StringStruct('Comments', 'yt-dlp%s Command Line Interface.' % suffix), StringStruct('CompanyName', 'https://github.com/yt-dlp'), StringStruct('FileDescription', 'yt-dlp%s' % (' (32 Bit)' if ARCH == '32' else '')), StringStruct('FileVersion', version), StringStruct('InternalName', f'yt-dlp{suffix}'), StringStruct('LegalCopyright', 'pukkandan.ytdlp@gmail.com | UNLICENSE'), StringStruct('OriginalFilename', f'yt-dlp{suffix}.exe'), StringStruct('ProductName', f'yt-dlp{suffix}'), StringStruct( 'ProductVersion', f'{version}{suffix} on Python {platform.python_version()}'), ])]), VarFileInfo([VarStruct('Translation', [0, 1200])]) ] )) if __name__ == '__main__': main() yt-dlp-2022.04.08/pytest.ini000066400000000000000000000001021422400336200153400ustar00rootroot00000000000000[pytest] addopts = -ra -v --strict-markers markers = download yt-dlp-2022.04.08/requirements.txt000066400000000000000000000002201422400336200165740ustar00rootroot00000000000000mutagen pycryptodomex websockets brotli; platform_python_implementation=='CPython' brotlicffi; platform_python_implementation!='CPython' certifiyt-dlp-2022.04.08/setup.cfg000066400000000000000000000005031422400336200151350ustar00rootroot00000000000000[wheel] universal = True [flake8] exclude = yt_dlp/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 ignore = E402,E501,E731,E741,W503yt-dlp-2022.04.08/setup.py000066400000000000000000000112471422400336200150350ustar00rootroot00000000000000#!/usr/bin/env python3 # coding: utf-8 import os.path import warnings import sys try: from setuptools import setup, Command, find_packages setuptools_available = True except ImportError: from distutils.core import setup, Command setuptools_available = False from distutils.spawn import spawn # Get the version from yt_dlp/version.py without importing the package exec(compile(open('yt_dlp/version.py').read(), 'yt_dlp/version.py', 'exec')) DESCRIPTION = 'A youtube-dl fork with additional features and patches' LONG_DESCRIPTION = '\n\n'.join(( 'Official repository: ', '**PS**: Some links in this document will not work since this is a copy of the README.md from Github', open('README.md', encoding='utf-8').read())) REQUIREMENTS = open('requirements.txt', encoding='utf-8').read().splitlines() if sys.argv[1:2] == ['py2exe']: import py2exe warnings.warn( 'py2exe builds do not support pycryptodomex and needs VC++14 to run. ' 'The recommended way is to use "pyinst.py" to build using pyinstaller') params = { 'console': [{ 'script': './yt_dlp/__main__.py', 'dest_base': 'yt-dlp', 'version': __version__, 'description': DESCRIPTION, 'comments': LONG_DESCRIPTION.split('\n')[0], 'product_name': 'yt-dlp', 'product_version': __version__, }], 'options': { 'py2exe': { 'bundle_files': 0, 'compressed': 1, 'optimize': 2, 'dist_dir': './dist', 'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto 'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'], } }, 'zipfile': None } else: files_spec = [ ('share/bash-completion/completions', ['completions/bash/yt-dlp']), ('share/zsh/site-functions', ['completions/zsh/_yt-dlp']), ('share/fish/vendor_completions.d', ['completions/fish/yt-dlp.fish']), ('share/doc/yt_dlp', ['README.txt']), ('share/man/man1', ['yt-dlp.1']) ] root = os.path.dirname(os.path.abspath(__file__)) data_files = [] for dirname, files in files_spec: resfiles = [] for fn in files: if not os.path.exists(fn): warnings.warn('Skipping file %s since it is not present. Try running `make pypi-files` first' % fn) else: resfiles.append(fn) data_files.append((dirname, resfiles)) params = { 'data_files': data_files, } if setuptools_available: params['entry_points'] = {'console_scripts': ['yt-dlp = yt_dlp:main']} else: params['scripts'] = ['yt-dlp'] class build_lazy_extractors(Command): description = 'Build the extractor lazy loading module' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): spawn([sys.executable, 'devscripts/make_lazy_extractors.py', 'yt_dlp/extractor/lazy_extractors.py'], dry_run=self.dry_run) if setuptools_available: packages = find_packages(exclude=('youtube_dl', 'youtube_dlc', 'test', 'ytdlp_plugins')) else: packages = ['yt_dlp', 'yt_dlp.downloader', 'yt_dlp.extractor', 'yt_dlp.postprocessor'] setup( name='yt-dlp', version=__version__, maintainer='pukkandan', maintainer_email='pukkandan.ytdlp@gmail.com', description=DESCRIPTION, long_description=LONG_DESCRIPTION, long_description_content_type='text/markdown', url='https://github.com/yt-dlp/yt-dlp', packages=packages, install_requires=REQUIREMENTS, project_urls={ 'Documentation': 'https://yt-dlp.readthedocs.io', 'Source': 'https://github.com/yt-dlp/yt-dlp', 'Tracker': 'https://github.com/yt-dlp/yt-dlp/issues', 'Funding': 'https://github.com/yt-dlp/yt-dlp/blob/master/Collaborators.md#collaborators', }, classifiers=[ 'Topic :: Multimedia :: Video', 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Programming Language :: Python', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'License :: Public Domain', 'Operating System :: OS Independent', ], python_requires='>=3.6', cmdclass={'build_lazy_extractors': build_lazy_extractors}, **params ) yt-dlp-2022.04.08/supportedsites.md000066400000000000000000001141611422400336200167410ustar00rootroot00000000000000# Supported sites - **17live** - **17live:clip** - **1tv**: Первый канал - **20min** - **23video** - **247sports** - **24video** - **3qsdn**: 3Q SDN - **3sat** - **4tube** - **56.com** - **6play** - **7plus** - **8tracks** - **91porn** - **9c9media** - **9gag** - **9now.com.au** - **abc.net.au** - **abc.net.au:iview** - **abc.net.au:iview:showseries** - **abcnews** - **abcnews:video** - **abcotvs**: ABC Owned Television Stations - **abcotvs:clips** - **AbemaTV** - **AbemaTVTitle** - **AcademicEarth:Course** - **acast** - **acast:channel** - **ADN**: Anime Digital Network - **AdobeConnect** - **adobetv** - **adobetv:channel** - **adobetv:embed** - **adobetv:show** - **adobetv:video** - **AdultSwim** - **aenetworks**: A+E Networks: A&E, Lifetime, History.com, FYI Network and History Vault - **aenetworks:collection** - **aenetworks:show** - **afreecatv**: afreecatv.com - **afreecatv:live**: afreecatv.com - **afreecatv:user** - **AirMozilla** - **AliExpressLive** - **AlJazeera** - **Allocine** - **AlphaPorno** - **Alsace20TV** - **Alsace20TVEmbed** - **Alura** - **AluraCourse** - **Amara** - **AmazonStore** - **AMCNetworks** - **AmericasTestKitchen** - **AmericasTestKitchenSeason** - **AmHistoryChannel** - **anderetijden**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl - **AnimalPlanet** - **AnimeLab** - **AnimeLabShows** - **AnimeOnDemand** - **ant1newsgr:article**: ant1news.gr articles - **ant1newsgr:embed**: ant1news.gr embedded videos - **ant1newsgr:watch**: ant1news.gr videos - **Anvato** - **aol.com**: Yahoo screen and movies - **APA** - **Aparat** - **AppleConnect** - **AppleDaily**: 臺灣蘋果日報 - **ApplePodcasts** - **appletrailers** - **appletrailers:section** - **archive.org**: archive.org video and audio - **ArcPublishing** - **ARD** - **ARD:mediathek** - **ARDBetaMediathek** - **Arkena** - **arte.sky.it** - **ArteTV** - **ArteTVCategory** - **ArteTVEmbed** - **ArteTVPlaylist** - **AsianCrush** - **AsianCrushPlaylist** - **AtresPlayer** - **ATTTechChannel** - **ATVAt** - **AudiMedia** - **AudioBoom** - **audiomack** - **audiomack:album** - **Audius**: Audius.co - **audius:artist**: Audius.co profile/artist pages - **audius:playlist**: Audius.co playlists - **audius:track**: Audius track ID or API link. Prepend with "audius:" - **AWAAN** - **awaan:live** - **awaan:season** - **awaan:video** - **AZMedien**: AZ Medien videos - **BaiduVideo**: 百度视频 - **BanBye** - **BanByeChannel** - **bandaichannel** - **Bandcamp** - **Bandcamp:album** - **Bandcamp:user** - **Bandcamp:weekly** - **bangumi.bilibili.com**: BiliBili番剧 - **BannedVideo** - **bbc**: BBC - **bbc.co.uk**: BBC iPlayer - **bbc.co.uk:article**: BBC articles - **bbc.co.uk:iplayer:episodes** - **bbc.co.uk:iplayer:group** - **bbc.co.uk:playlist** - **BBVTV** - **Beatport** - **Beeg** - **BehindKink** - **Bellator** - **BellMedia** - **Bet** - **bfi:player** - **bfmtv** - **bfmtv:article** - **bfmtv:live** - **BibelTV** - **Bigflix** - **Bigo** - **Bild**: Bild.de - **BiliBili** - **Bilibili category extractor** - **BilibiliAudio** - **BilibiliAudioAlbum** - **BilibiliChannel** - **BiliBiliPlayer** - **BiliBiliSearch**: Bilibili video search; "bilisearch:" prefix - **BiliIntl** - **BiliIntlSeries** - **BioBioChileTV** - **Biography** - **BIQLE** - **BitChute** - **BitChuteChannel** - **bitwave:replay** - **bitwave:stream** - **BlackboardCollaborate** - **BleacherReport** - **BleacherReportCMS** - **blogger.com** - **Bloomberg** - **BokeCC** - **BongaCams** - **BostonGlobe** - **Box** - **Bpb**: Bundeszentrale für politische Bildung - **BR**: Bayerischer Rundfunk - **BravoTV** - **Break** - **BreitBart** - **brightcove:legacy** - **brightcove:new** - **BRMediathek**: Bayerischer Rundfunk Mediathek - **bt:article**: Bergens Tidende Articles - **bt:vestlendingen**: Bergens Tidende - Vestlendingen - **BusinessInsider** - **BuzzFeed** - **BYUtv** - **CableAV** - **Callin** - **Caltrans** - **CAM4** - **Camdemy** - **CamdemyFolder** - **CamModels** - **CamWithHer** - **CanalAlpha** - **canalc2.tv** - **Canalplus**: mycanal.fr and piwiplus.fr - **Canvas** - **CanvasEen**: canvas.be and een.be - **CarambaTV** - **CarambaTVPage** - **CartoonNetwork** - **cbc.ca** - **cbc.ca:player** - **CBS** - **CBSInteractive** - **CBSLocal** - **CBSLocalArticle** - **cbsnews**: CBS News - **cbsnews:embed** - **cbsnews:livevideo**: CBS News Live Videos - **cbssports** - **cbssports:embed** - **CCMA** - **CCTV**: 央视网 - **CDA** - **CeskaTelevize** - **CGTN** - **channel9**: Channel 9 - **CharlieRose** - **Chaturbate** - **Chilloutzone** - **Chingari** - **ChingariUser** - **chirbit** - **chirbit:profile** - **cielotv.it** - **Cinchcast** - **Cinemax** - **CiscoLiveSearch** - **CiscoLiveSession** - **ciscowebex**: Cisco Webex - **CJSW** - **cliphunter** - **Clippit** - **ClipRs** - **Clipsyndicate** - **CloserToTruth** - **CloudflareStream** - **Cloudy** - **Clubic** - **Clyp** - **cmt.com** - **CNBC** - **CNBCVideo** - **CNN** - **CNNArticle** - **CNNBlogs** - **ComedyCentral** - **ComedyCentralTV** - **CondeNast**: Condé Nast media group: Allure, Architectural Digest, Ars Technica, Bon Appétit, Brides, Condé Nast, Condé Nast Traveler, Details, Epicurious, GQ, Glamour, Golf Digest, SELF, Teen Vogue, The New Yorker, Vanity Fair, Vogue, W Magazine, WIRED - **CONtv** - **CookingChannel** - **Corus** - **Coub** - **CozyTV** - **cp24** - **cpac** - **cpac:playlist** - **Cracked** - **Crackle** - **Craftsy** - **CrooksAndLiars** - **CrowdBunker** - **CrowdBunkerChannel** - **crunchyroll** - **crunchyroll:beta** - **crunchyroll:playlist** - **crunchyroll:playlist:beta** - **CSpan**: C-SPAN - **CSpanCongress** - **CtsNews**: 華視新聞 - **CTV** - **CTVNews** - **cu.ntv.co.jp**: Nippon Television Network - **CultureUnplugged** - **curiositystream** - **curiositystream:collections** - **curiositystream:series** - **CWTV** - **Cybrary** - **CybraryCourse** - **Daftsex** - **DagelijkseKost**: dagelijksekost.een.be - **DailyMail** - **dailymotion** - **dailymotion:playlist** - **dailymotion:user** - **damtomo:record** - **damtomo:video** - **daum.net** - **daum.net:clip** - **daum.net:playlist** - **daum.net:user** - **daystar:clip** - **DBTV** - **DctpTv** - **DeezerAlbum** - **DeezerPlaylist** - **defense.gouv.fr** - **democracynow** - **DestinationAmerica** - **DHM**: Filmarchiv - Deutsches Historisches Museum - **Digg** - **DigitalConcertHall**: DigitalConcertHall extractor - **DigitallySpeaking** - **Digiteka** - **Discovery** - **DiscoveryLife** - **DiscoveryNetworksDe** - **DiscoveryPlus** - **DiscoveryPlusIndia** - **DiscoveryPlusIndiaShow** - **DiscoveryPlusItaly** - **DiscoveryPlusItalyShow** - **Disney** - **DIYNetwork** - **dlive:stream** - **dlive:vod** - **DoodStream** - **Dotsub** - **Douyin** - **DouyuShow** - **DouyuTV**: 斗鱼 - **DPlay** - **DRBonanza** - **Drooble** - **Dropbox** - **Dropout** - **DropoutSeason** - **DrTuber** - **drtv** - **drtv:live** - **DTube** - **duboku**: www.duboku.co - **duboku:list**: www.duboku.co entire series - **Dumpert** - **dvtv**: http://video.aktualne.cz/ - **dw** - **dw:article** - **EaglePlatform** - **EbaumsWorld** - **EchoMsk** - **egghead:course**: egghead.io course - **egghead:lesson**: egghead.io lesson - **ehftv** - **eHow** - **EinsUndEinsTV** - **Einthusan** - **eitb.tv** - **EllenTube** - **EllenTubePlaylist** - **EllenTubeVideo** - **Elonet** - **ElPais**: El País - **Embedly** - **EMPFlix** - **Engadget** - **Epicon** - **EpiconSeries** - **Eporner** - **EroProfile** - **EroProfile:album** - **ertflix**: ERTFLIX videos - **ertflix:codename**: ERTFLIX videos by codename - **ertwebtv:embed**: ert.gr webtv embedded videos - **Escapist** - **ESPN** - **ESPNArticle** - **ESPNCricInfo** - **EsriVideo** - **Europa** - **EuropeanTour** - **EUScreen** - **EWETV** - **ExpoTV** - **Expressen** - **ExtremeTube** - **EyedoTV** - **facebook** - **FacebookPluginsVideo** - **fancode:live** - **fancode:vod** - **faz.net** - **fc2** - **fc2:embed** - **fc2:live** - **Fczenit** - **Filmmodu** - **filmon** - **filmon:channel** - **Filmweb** - **FiveThirtyEight** - **FiveTV** - **Flickr** - **Folketinget**: Folketinget (ft.dk; Danish parliament) - **FoodNetwork** - **FootyRoom** - **Formula1** - **FOX** - **FOX9** - **FOX9News** - **Foxgay** - **foxnews**: Fox News and Fox Business Video - **foxnews:article** - **FoxSports** - **fptplay**: fptplay.vn - **FranceCulture** - **FranceInter** - **FranceTV** - **francetvinfo.fr** - **FranceTVSite** - **Freesound** - **freespeech.org** - **FrontendMasters** - **FrontendMastersCourse** - **FrontendMastersLesson** - **FujiTVFODPlus7** - **Funimation** - **funimation:page** - **funimation:show** - **Funk** - **Fusion** - **Fux** - **Gab** - **GabTV** - **Gaia** - **GameInformer** - **GameJolt** - **GameJoltCommunity** - **GameJoltGame** - **GameJoltGameSoundtrack** - **GameJoltSearch** - **GameJoltUser** - **GameSpot** - **GameStar** - **Gaskrank** - **Gazeta** - **GDCVault** - **GediDigital** - **gem.cbc.ca** - **gem.cbc.ca:live** - **gem.cbc.ca:playlist** - **generic**: Generic downloader that works on some sites - **Gettr** - **GettrStreaming** - **Gfycat** - **GiantBomb** - **Giga** - **GlattvisionTV** - **Glide**: Glide mobile video messages (glide.me) - **Globo** - **GloboArticle** - **glomex**: Glomex videos - **glomex:embed**: Glomex embedded videos - **Go** - **GoDiscovery** - **GodTube** - **Gofile** - **Golem** - **google:podcasts** - **google:podcasts:feed** - **GoogleDrive** - **GoPro** - **Goshgay** - **GoToStage** - **GPUTechConf** - **Gronkh** - **Groupon** - **hbo** - **HearThisAt** - **Heise** - **HellPorno** - **Helsinki**: helsinki.fi - **HentaiStigma** - **hetklokhuis** - **hgtv.com:show** - **HGTVDe** - **HGTVUsa** - **HiDive** - **HistoricFilms** - **history:player** - **history:topic**: History.com Topic - **hitbox** - **hitbox:live** - **HitRecord** - **hketv**: 香港教育局教育電視 (HKETV) Educational Television, Hong Kong Educational Bureau - **HotNewHipHop** - **hotstar** - **hotstar:playlist** - **hotstar:series** - **Howcast** - **HowStuffWorks** - **hrfernsehen** - **HRTi** - **HRTiPlaylist** - **HSEProduct** - **HSEShow** - **Huajiao**: 花椒直播 - **HuffPost**: Huffington Post - **Hungama** - **HungamaAlbumPlaylist** - **HungamaSong** - **huya:live**: huya.com - **Hypem** - **ign.com** - **IGNArticle** - **IGNVideo** - **IHeartRadio** - **iheartradio:podcast** - **imdb**: Internet Movie Database trailers - **imdb:list**: Internet Movie Database lists - **Imgur** - **imgur:album** - **imgur:gallery** - **Ina** - **Inc** - **IndavideoEmbed** - **InfoQ** - **Instagram** - **instagram:story** - **instagram:tag**: Instagram hashtag search URLs - **instagram:user**: Instagram user profile - **InstagramIOS**: IOS instagram:// URL - **Internazionale** - **InternetVideoArchive** - **InvestigationDiscovery** - **IPrima** - **IPrimaCNN** - **iq.com**: International version of iQiyi - **iq.com:album** - **iqiyi**: 爱奇艺 - **ITProTV** - **ITProTVCourse** - **ITTF** - **ITV** - **ITVBTCC** - **ivi**: ivi.ru - **ivi:compilation**: ivi.ru compilations - **ivideon**: Ivideon TV - **Iwara** - **Izlesene** - **Jable** - **JablePlaylist** - **Jamendo** - **JamendoAlbum** - **JeuxVideo** - **Joj** - **Jove** - **JWPlatform** - **Kakao** - **Kaltura** - **Karaoketv** - **KarriereVideos** - **Katsomo** - **KeezMovies** - **KelbyOne** - **Ketnet** - **khanacademy** - **khanacademy:unit** - **KickStarter** - **KinjaEmbed** - **KinoPoisk** - **KonserthusetPlay** - **Koo** - **KrasView**: Красвью - **Ku6** - **KUSI** - **kuwo:album**: 酷我音乐 - 专辑 - **kuwo:category**: 酷我音乐 - 分类 - **kuwo:chart**: 酷我音乐 - 排行榜 - **kuwo:mv**: 酷我音乐 - MV - **kuwo:singer**: 酷我音乐 - 歌手 - **kuwo:song**: 酷我音乐 - **la7.it** - **la7.it:pod:episode** - **la7.it:podcast** - **laola1tv** - **laola1tv:embed** - **LastFM** - **LastFMPlaylist** - **LastFMUser** - **lbry** - **lbry:channel** - **LCI** - **Lcp** - **LcpPlay** - **Le**: 乐视网 - **Lecture2Go** - **Lecturio** - **LecturioCourse** - **LecturioDeCourse** - **LEGO** - **Lemonde** - **Lenta** - **LePlaylist** - **LetvCloud**: 乐视云 - **Libsyn** - **life**: Life.ru - **life:embed** - **limelight** - **limelight:channel** - **limelight:channel_list** - **LineLive** - **LineLiveChannel** - **LinkedIn** - **linkedin:learning** - **linkedin:learning:course** - **LinuxAcademy** - **LiTV** - **LiveJournal** - **livestream** - **livestream:original** - **Lnk** - **LnkGo** - **loc**: Library of Congress - **LocalNews8** - **LoveHomePorn** - **lrt.lt** - **lynda**: lynda.com videos - **lynda:course**: lynda.com online courses - **m6** - **MagentaMusik360** - **mailru**: Видео@Mail.Ru - **mailru:music**: Музыка@Mail.Ru - **mailru:music:search**: Музыка@Mail.Ru - **MainStreaming**: MainStreaming Player - **MallTV** - **mangomolo:live** - **mangomolo:video** - **MangoTV**: 芒果TV - **ManotoTV**: Manoto TV (Episode) - **ManotoTVLive**: Manoto TV (Live) - **ManotoTVShow**: Manoto TV (Show) - **ManyVids** - **MaoriTV** - **Markiza** - **MarkizaPage** - **massengeschmack.tv** - **MatchTV** - **MDR**: MDR.DE and KiKA - **MedalTV** - **media.ccc.de** - **media.ccc.de:lists** - **Mediaite** - **MediaKlikk** - **Medialaan** - **Mediaset** - **MediasetShow** - **Mediasite** - **MediasiteCatalog** - **MediasiteNamedCatalog** - **Medici** - **megaphone.fm**: megaphone.fm embedded players - **megatvcom**: megatv.com videos - **megatvcom:embed**: megatv.com embedded videos - **Meipai**: 美拍 - **MelonVOD** - **META** - **metacafe** - **Metacritic** - **mewatch** - **Mgoon** - **MiaoPai** - **microsoftstream**: Microsoft Stream - **mildom**: Record ongoing live by specific user in Mildom - **mildom:clip**: Clip in Mildom - **mildom:user:vod**: Download all VODs from specific user in Mildom - **mildom:vod**: VOD in Mildom - **minds** - **minds:channel** - **minds:group** - **MinistryGrid** - **Minoto** - **miomio.tv** - **mirrativ** - **mirrativ:user** - **MiTele**: mitele.es - **mixch** - **mixch:archive** - **mixcloud** - **mixcloud:playlist** - **mixcloud:user** - **MLB** - **MLBVideo** - **MLSSoccer** - **Mnet** - **MNetTV** - **MoeVideo**: LetitBit video services: moevideo.net, playreplay.net and videochart.net - **Mofosex** - **MofosexEmbed** - **Mojvideo** - **Morningstar**: morningstar.com - **Motherless** - **MotherlessGroup** - **Motorsport**: motorsport.com - **MovieClips** - **MovieFap** - **Moviepilot** - **Moviezine** - **MovingImage** - **MSN** - **mtg**: MTG services - **mtv** - **mtv.de** - **mtv.it** - **mtv.it:programma** - **mtv:video** - **mtvjapan** - **mtvservices:embedded** - **MTVUutisetArticle** - **MuenchenTV**: münchen.tv - **Murrtube** - **MurrtubeUser**: Murrtube user profile - **MuseScore** - **MusicdexAlbum** - **MusicdexArtist** - **MusicdexPlaylist** - **MusicdexSong** - **mva**: Microsoft Virtual Academy videos - **mva:course**: Microsoft Virtual Academy courses - **Mwave** - **MwaveMeetGreet** - **Mxplayer** - **MxplayerShow** - **MyChannels** - **MySpace** - **MySpace:album** - **MySpass** - **Myvi** - **MyVideoGe** - **MyVidster** - **MyviEmbed** - **n-tv.de** - **N1Info:article** - **N1InfoAsset** - **Nate** - **NateProgram** - **natgeo:video** - **NationalGeographicTV** - **Naver** - **Naver:live** - **NBA** - **nba:watch** - **nba:watch:collection** - **NBAChannel** - **NBAEmbed** - **NBAWatchEmbed** - **NBC** - **NBCNews** - **nbcolympics** - **nbcolympics:stream** - **NBCSports** - **NBCSportsStream** - **NBCSportsVPlayer** - **ndr**: NDR.de - Norddeutscher Rundfunk - **ndr:embed** - **ndr:embed:base** - **NDTV** - **Nebula** - **nebula:collection** - **NerdCubedFeed** - **netease:album**: 网易云音乐 - 专辑 - **netease:djradio**: 网易云音乐 - 电台 - **netease:mv**: 网易云音乐 - MV - **netease:playlist**: 网易云音乐 - 歌单 - **netease:program**: 网易云音乐 - 电台节目 - **netease:singer**: 网易云音乐 - 歌手 - **netease:song**: 网易云音乐 - **NetPlus** - **Netzkino** - **Newgrounds** - **Newgrounds:playlist** - **Newgrounds:user** - **Newstube** - **Newsy** - **NextMedia**: 蘋果日報 - **NextMediaActionNews**: 蘋果日報 - 動新聞 - **NextTV**: 壹電視 - **Nexx** - **NexxEmbed** - **NFB** - **NFHSNetwork** - **nfl.com** (Currently broken) - **nfl.com:article** (Currently broken) - **NhkForSchoolBangumi** - **NhkForSchoolProgramList** - **NhkForSchoolSubject**: Portal page for each school subjects, like Japanese (kokugo, 国語) or math (sansuu/suugaku or 算数・数学) - **NhkVod** - **NhkVodProgram** - **nhl.com** - **nick.com** - **nick.de** - **nickelodeon:br** - **nickelodeonru** - **nicknight** - **niconico**: ニコニコ動画 - **niconico:history**: NicoNico user history. Requires cookies. - **niconico:playlist** - **niconico:series** - **niconico:tag**: NicoNico video tag URLs - **NiconicoUser** - **nicovideo:search**: Nico video search; "nicosearch:" prefix - **nicovideo:search:date**: Nico video search, newest first; "nicosearchdate:" prefix - **nicovideo:search_url**: Nico video search URLs - **Nintendo** - **Nitter** - **njoy**: N-JOY - **njoy:embed** - **NJPWWorld**: 新日本プロレスワールド - **NobelPrize** - **NonkTube** - **NoodleMagazine** - **Noovo** - **Normalboots** - **NosVideo** - **Nova**: TN.cz, Prásk.tv, Nova.cz, Novaplus.cz, FANDA.tv, Krásná.cz and Doma.cz - **NovaEmbed** - **NovaPlay** - **nowness** - **nowness:playlist** - **nowness:series** - **Noz** - **npo**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl - **npo.nl:live** - **npo.nl:radio** - **npo.nl:radio:fragment** - **Npr** - **NRK** - **NRKPlaylist** - **NRKRadioPodkast** - **NRKSkole**: NRK Skole - **NRKTV**: NRK TV and NRK Radio - **NRKTVDirekte**: NRK TV Direkte and NRK Radio Direkte - **NRKTVEpisode** - **NRKTVEpisodes** - **NRKTVSeason** - **NRKTVSeries** - **NRLTV** - **ntv.ru** - **Nuvid** - **NYTimes** - **NYTimesArticle** - **NYTimesCooking** - **nzherald** - **NZZ** - **ocw.mit.edu** - **OdaTV** - **Odnoklassniki** - **OktoberfestTV** - **OlympicsReplay** - **on24**: ON24 - **OnDemandKorea** - **OneFootball** - **onet.pl** - **onet.tv** - **onet.tv:channel** - **OnetMVP** - **OnionStudios** - **Ooyala** - **OoyalaExternal** - **Opencast** - **OpencastPlaylist** - **openrec** - **openrec:capture** - **openrec:movie** - **OraTV** - **orf:burgenland**: Radio Burgenland - **orf:fm4**: radio FM4 - **orf:fm4:story**: fm4.orf.at stories - **orf:iptv**: iptv.ORF.at - **orf:kaernten**: Radio Kärnten - **orf:noe**: Radio Niederösterreich - **orf:oberoesterreich**: Radio Oberösterreich - **orf:oe1**: Radio Österreich 1 - **orf:oe3**: Radio Österreich 3 - **orf:salzburg**: Radio Salzburg - **orf:steiermark**: Radio Steiermark - **orf:tirol**: Radio Tirol - **orf:tvthek**: ORF TVthek - **orf:vorarlberg**: Radio Vorarlberg - **orf:wien**: Radio Wien - **OsnatelTV** - **OutsideTV** - **PacktPub** - **PacktPubCourse** - **PalcoMP3:artist** - **PalcoMP3:song** - **PalcoMP3:video** - **pandora.tv**: 판도라TV - **Panopto** - **PanoptoList** - **PanoptoPlaylist** - **ParamountNetwork** - **ParamountPlus** - **ParamountPlusSeries** - **parliamentlive.tv**: UK parliament videos - **Parlview** - **Patreon** - **PatreonUser** - **pbs**: Public Broadcasting Service (PBS) and member stations: PBS: Public Broadcasting Service, APT - Alabama Public Television (WBIQ), GPB/Georgia Public Broadcasting (WGTV), Mississippi Public Broadcasting (WMPN), Nashville Public Television (WNPT), WFSU-TV (WFSU), WSRE (WSRE), WTCI (WTCI), WPBA/Channel 30 (WPBA), Alaska Public Media (KAKM), Arizona PBS (KAET), KNME-TV/Channel 5 (KNME), Vegas PBS (KLVX), AETN/ARKANSAS ETV NETWORK (KETS), KET (WKLE), WKNO/Channel 10 (WKNO), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), OETA (KETA), Ozarks Public Television (KOZK), WSIU Public Broadcasting (WSIU), KEET TV (KEET), KIXE/Channel 9 (KIXE), KPBS San Diego (KPBS), KQED (KQED), KVIE Public Television (KVIE), PBS SoCal/KOCE (KOCE), ValleyPBS (KVPT), CONNECTICUT PUBLIC TELEVISION (WEDH), KNPB Channel 5 (KNPB), SOPTV (KSYS), Rocky Mountain PBS (KRMA), KENW-TV3 (KENW), KUED Channel 7 (KUED), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), Thirteen/WNET New York (WNET), WGBH/Channel 2 (WGBH), WGBY (WGBY), NJTV Public Media NJ (WNJT), WLIW21 (WLIW), mpt/Maryland Public Television (WMPB), WETA Television and Radio (WETA), WHYY (WHYY), PBS 39 (WLVT), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), WEDU PBS (WEDU), WGCU Public Media (WGCU), WPBT2 (WPBT), WUCF TV (WUCF), WUFT/Channel 5 (WUFT), WXEL/Channel 42 (WXEL), WLRN/Channel 17 (WLRN), WUSF Public Broadcasting (WUSF), ETV (WRLK), UNC-TV (WUNC), PBS Hawaii - Oceanic Cable Channel 10 (KHET), Idaho Public Television (KAID), KSPS (KSPS), OPB (KOPB), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WILL-TV (WILL), Network Knowledge - WSEC/Springfield (WSEC), WTTW11 (WTTW), Iowa Public Television/IPTV (KDIN), Nine Network (KETC), PBS39 Fort Wayne (WFWA), WFYI Indianapolis (WFYI), Milwaukee Public Television (WMVS), WNIN (WNIN), WNIT Public Television (WNIT), WPT (WPNE), WVUT/Channel 22 (WVUT), WEIU/Channel 51 (WEIU), WQPT-TV (WQPT), WYCC PBS Chicago (WYCC), WIPB-TV (WIPB), WTIU (WTIU), CET (WCET), ThinkTVNetwork (WPTD), WBGU-TV (WBGU), WGVU TV (WGVU), NET1 (KUON), Pioneer Public Television (KWCM), SDPB Television (KUSD), TPT (KTCA), KSMQ (KSMQ), KPTS/Channel 8 (KPTS), KTWU/Channel 11 (KTWU), East Tennessee PBS (WSJK), WCTE-TV (WCTE), WLJT, Channel 11 (WLJT), WOSU TV (WOSU), WOUB/WOUC (WOUB), WVPB (WVPB), WKYU-PBS (WKYU), KERA 13 (KERA), MPBN (WCBB), Mountain Lake PBS (WCFE), NHPTV (WENH), Vermont PBS (WETK), witf (WITF), WQED Multimedia (WQED), WMHT Educational Telecommunications (WMHT), Q-TV (WDCQ), WTVS Detroit Public TV (WTVS), CMU Public Television (WCMU), WKAR-TV (WKAR), WNMU-TV Public TV 13 (WNMU), WDSE - WRPT (WDSE), WGTE TV (WGTE), Lakeland Public Television (KAWE), KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS), MontanaPBS (KUSM), KRWG/Channel 22 (KRWG), KACV (KACV), KCOS/Channel 13 (KCOS), WCNY/Channel 24 (WCNY), WNED (WNED), WPBS (WPBS), WSKG Public TV (WSKG), WXXI (WXXI), WPSU (WPSU), WVIA Public Media Studios (WVIA), WTVI (WTVI), Western Reserve PBS (WNEO), WVIZ/PBS ideastream (WVIZ), KCTS 9 (KCTS), Basin PBS (KPBT), KUHT / Channel 8 (KUHT), KLRN (KLRN), KLRU (KLRU), WTJX Channel 12 (WTJX), WCVE PBS (WCVE), KBTC Public Television (KBTC) - **PearVideo** - **PeekVids** - **peer.tv** - **PeerTube** - **PeerTube:Playlist** - **peloton** - **peloton:live**: Peloton Live - **People** - **PerformGroup** - **periscope**: Periscope - **periscope:user**: Periscope user videos - **PhilharmonieDeParis**: Philharmonie de Paris - **phoenix.de** - **Photobucket** - **Piapro** - **Picarto** - **PicartoVod** - **Piksel** - **Pinkbike** - **Pinterest** - **PinterestCollection** - **pixiv:sketch** - **pixiv:sketch:user** - **Pladform** - **PlanetMarathi** - **Platzi** - **PlatziCourse** - **play.fm** - **player.sky.it** - **PlayPlusTV** - **PlayStuff** - **PlaysTV** - **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz - **Playvid** - **PlayVids** - **Playwire** - **pluralsight** - **pluralsight:course** - **PlutoTV** - **podomatic** - **Pokemon** - **PokemonSoundLibrary** - **PokemonWatch** - **PokerGo** - **PokerGoCollection** - **PolsatGo** - **PolskieRadio** - **polskieradio:kierowcow** - **polskieradio:player** - **polskieradio:podcast** - **polskieradio:podcast:list** - **PolskieRadioCategory** - **Popcorntimes** - **PopcornTV** - **PornCom** - **PornerBros** - **Pornez** - **PornFlip** - **PornHd** - **PornHub**: PornHub and Thumbzilla - **PornHubPagedVideoList** - **PornHubPlaylist** - **PornHubUser** - **PornHubUserVideosUpload** - **Pornotube** - **PornoVoisines** - **PornoXO** - **PornTube** - **PressTV** - **ProjectVeritas** - **prosiebensat1**: ProSiebenSat.1 Digital - **PRXAccount** - **PRXSeries** - **prxseries:search**: PRX Series Search; "prxseries:" prefix - **prxstories:search**: PRX Stories Search; "prxstories:" prefix - **PRXStory** - **puhutv** - **puhutv:serie** - **Puls4** - **Pyvideo** - **qqmusic**: QQ音乐 - **qqmusic:album**: QQ音乐 - 专辑 - **qqmusic:playlist**: QQ音乐 - 歌单 - **qqmusic:singer**: QQ音乐 - 歌手 - **qqmusic:toplist**: QQ音乐 - 排行榜 - **QuantumTV** - **Qub** - **R7** - **R7Article** - **Radiko** - **RadikoRadio** - **radio.de** - **radiobremen** - **radiocanada** - **radiocanada:audiovideo** - **radiofrance** - **RadioJavan** - **radiokapital** - **radiokapital:show** - **RadioZetPodcast** - **radlive** - **radlive:channel** - **radlive:season** - **Rai** - **RaiPlay** - **RaiPlayLive** - **RaiPlayPlaylist** - **RaiPlaySound** - **RaiPlaySoundLive** - **RaiPlaySoundPlaylist** - **RayWenderlich** - **RayWenderlichCourse** - **RBMARadio** - **RCS** - **RCSEmbeds** - **RCSVarious** - **RCTIPlus** - **RCTIPlusSeries** - **RCTIPlusTV** - **RDS**: RDS.ca - **RedBull** - **RedBullEmbed** - **RedBullTV** - **RedBullTVRrnContent** - **Reddit** - **RedGifs** - **RedGifsSearch**: Redgifs search - **RedGifsUser**: Redgifs user - **RedTube** - **RegioTV** - **RENTV** - **RENTVArticle** - **Restudy** - **Reuters** - **ReverbNation** - **RICE** - **RMCDecouverte** - **RockstarGames** - **Rokfin** - **rokfin:channel** - **rokfin:stack** - **RoosterTeeth** - **RoosterTeethSeries** - **RottenTomatoes** - **Rozhlas** - **RTBF** - **RTDocumentry** - **RTDocumentryPlaylist** - **rte**: Raidió Teilifís Éireann TV - **rte:radio**: Raidió Teilifís Éireann radio - **rtl.nl**: rtl.nl and rtlxl.nl - **rtl2** - **rtl2:you** - **rtl2:you:series** - **RTNews** - **RTP** - **RTRFM** - **RTS**: RTS.ch - **rtve.es:alacarta**: RTVE a la carta - **rtve.es:audio**: RTVE audio - **rtve.es:infantil**: RTVE infantil - **rtve.es:live**: RTVE.es live streams - **rtve.es:television** - **RTVNH** - **RTVS** - **RUHD** - **Rule34Video** - **RumbleChannel** - **RumbleEmbed** - **Ruptly** - **rutube**: Rutube videos - **rutube:channel**: Rutube channel - **rutube:embed**: Rutube embedded videos - **rutube:movie**: Rutube movies - **rutube:person**: Rutube person videos - **rutube:playlist**: Rutube playlists - **rutube:tags**: Rutube tags - **RUTV**: RUTV.RU - **Ruutu** - **Ruv** - **ruv.is:spila** - **safari**: safaribooksonline.com online video - **safari:api** - **safari:course**: safaribooksonline.com online courses - **Saitosan** - **SAKTV** - **SaltTV** - **SampleFocus** - **Sapo**: SAPO Vídeos - **savefrom.net** - **SBS**: sbs.com.au - **schooltv** - **ScienceChannel** - **screen.yahoo:search**: Yahoo screen search; "yvsearch:" prefix - **Screencast** - **ScreencastOMatic** - **ScrippsNetworks** - **scrippsnetworks:watch** - **SCTE** - **SCTECourse** - **Seeker** - **SenateGov** - **SenateISVP** - **SendtoNews** - **Servus** - **Sexu** - **SeznamZpravy** - **SeznamZpravyArticle** - **Shahid** - **ShahidShow** - **Shared**: shared.sx - **ShemarooMe** - **ShowRoomLive** - **simplecast** - **simplecast:episode** - **simplecast:podcast** - **Sina** - **Skeb** - **sky.it** - **sky:news** - **sky:news:story** - **sky:sports** - **sky:sports:news** - **skyacademy.it** - **SkylineWebcams** - **skynewsarabia:article** - **skynewsarabia:video** - **SkyNewsAU** - **Slideshare** - **SlidesLive** - **Slutload** - **Snotr** - **Sohu** - **SonyLIV** - **SonyLIVSeries** - **soundcloud** - **soundcloud:playlist** - **soundcloud:related** - **soundcloud:search**: Soundcloud search; "scsearch:" prefix - **soundcloud:set** - **soundcloud:trackstation** - **soundcloud:user** - **SoundcloudEmbed** - **soundgasm** - **soundgasm:profile** - **southpark.cc.com** - **southpark.cc.com:español** - **southpark.de** - **southpark.nl** - **southparkstudios.dk** - **SovietsCloset** - **SovietsClosetPlaylist** - **SpankBang** - **SpankBangPlaylist** - **Spankwire** - **Spiegel** - **Sport5** - **SportBox** - **SportDeutschland** - **spotify** - **spotify:show** - **Spreaker** - **SpreakerPage** - **SpreakerShow** - **SpreakerShowPage** - **SpringboardPlatform** - **Sprout** - **sr:mediathek**: Saarländischer Rundfunk - **SRGSSR** - **SRGSSRPlay**: srf.ch, rts.ch, rsi.ch, rtr.ch and swissinfo.ch play sites - **stanfordoc**: Stanford Open ClassRoom - **startv** - **Steam** - **Stitcher** - **StitcherShow** - **StoryFire** - **StoryFireSeries** - **StoryFireUser** - **Streamable** - **Streamanity** - **streamcloud.eu** - **StreamCZ** - **StreamFF** - **StreetVoice** - **StretchInternet** - **Stripchat** - **stv:player** - **SunPorno** - **sverigesradio:episode** - **sverigesradio:publication** - **SVT** - **SVTPage** - **SVTPlay**: SVT Play and Öppet arkiv - **SVTSeries** - **SWRMediathek** - **Syfy** - **SztvHu** - **t-online.de** - **Tagesschau** - **Tass** - **TBS** - **TDSLifeway** - **Teachable** - **TeachableCourse** - **teachertube**: teachertube.com videos - **teachertube:user:collection**: teachertube.com user and collection videos - **TeachingChannel** - **Teamcoco** - **TeamTreeHouse** - **TechTalks** - **techtv.mit.edu** - **TedEmbed** - **TedPlaylist** - **TedSeries** - **TedTalk** - **Tele13** - **Tele5** - **TeleBruxelles** - **Telecinco**: telecinco.es, cuatro.com and mediaset.es - **Telegraaf** - **telegram:embed** - **TeleMB** - **Telemundo** - **TeleQuebec** - **TeleQuebecEmission** - **TeleQuebecLive** - **TeleQuebecSquat** - **TeleQuebecVideo** - **TeleTask** - **Telewebion** - **TennisTV** - **TenPlay** - **TF1** - **TFO** - **TheIntercept** - **ThePlatform** - **ThePlatformFeed** - **TheStar** - **TheSun** - **ThetaStream** - **ThetaVideo** - **TheWeatherChannel** - **ThisAmericanLife** - **ThisAV** - **ThisOldHouse** - **ThreeSpeak** - **ThreeSpeakUser** - **TikTok** - **tiktok:effect** - **tiktok:sound** - **tiktok:tag** - **tiktok:user** - **tinypic**: tinypic.com videos - **TLC** - **TMZ** - **TNAFlix** - **TNAFlixNetworkEmbed** - **toggle** - **toggo** - **Tokentube** - **Tokentube:channel** - **ToonGoggles** - **tou.tv** - **Toypics**: Toypics video - **ToypicsUser**: Toypics user profile - **TrailerAddict** (Currently broken) - **TravelChannel** - **Trilulilu** - **Trovo** - **TrovoChannelClip**: All Clips of a trovo.live channel; "trovoclip:" prefix - **TrovoChannelVod**: All VODs of a trovo.live channel; "trovovod:" prefix - **TrovoVod** - **TrueID** - **TruNews** - **TruTV** - **Tube8** - **TubiTv** - **TubiTvShow** - **Tumblr** - **tunein:clip** - **tunein:program** - **tunein:station** - **tunein:topic** - **TunePk** - **Turbo** - **tv.dfb.de** - **TV2** - **TV2Article** - **TV2DK** - **TV2DKBornholmPlay** - **tv2play.hu** - **tv2playseries.hu** - **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** - **TVNet** - **TVNoe** - **TVNow** - **TVNowAnnual** - **TVNowFilm** - **TVNowNew** - **TVNowSeason** - **TVNowShow** - **tvopengr:embed**: tvopen.gr embedded videos - **tvopengr:watch**: tvopen.gr (and ethnos.gr) videos - **tvp**: Telewizja Polska - **tvp:embed**: Telewizja Polska - **tvp:series** - **tvp:stream** - **TVPlayer** - **TVPlayHome** - **Tweakers** - **TwitCasting** - **TwitCastingLive** - **TwitCastingUser** - **twitch:clips** - **twitch:stream** - **twitch:vod** - **TwitchCollection** - **TwitchVideos** - **TwitchVideosClips** - **TwitchVideosCollections** - **twitter** - **twitter:amplify** - **twitter:broadcast** - **twitter:card** - **twitter:shortener** - **udemy** - **udemy:course** - **UDNEmbed**: 聯合影音 - **UFCArabia** - **UFCTV** - **ukcolumn** - **UKTVPlay** - **umg:de**: Universal Music Deutschland - **Unistra** - **Unity** - **uol.com.br** - **uplynk** - **uplynk:preplay** - **Urort**: NRK P3 Urørt - **URPlay** - **USANetwork** - **USAToday** - **ustream** - **ustream:channel** - **ustudio** - **ustudio:embed** - **Utreon** - **Varzesh3** - **Vbox7** - **VeeHD** - **Veo** - **Veoh** - **Vesti**: Вести.Ru - **Vevo** - **VevoPlaylist** - **VGTV**: VGTV, BTTV, FTV, Aftenposten and Aftonbladet - **vh1.com** - **vhx:embed** - **Viafree** - **vice** - **vice:article** - **vice:show** - **Vidbit** - **Viddler** - **Videa** - **video.arnes.si**: Arnes Video - **video.google:search**: Google Video search; "gvsearch:" prefix - **video.sky.it** - **video.sky.it:live** - **VideocampusSachsen** - **VideocampusSachsenEmbed** - **VideoDetective** - **videofy.me** - **videomore** - **videomore:season** - **videomore:video** - **VideoPress** - **Vidio** - **VidioLive** - **VidioPremier** - **VidLii** - **vier**: vier.be and vijf.be - **vier:videos** - **viewlift** - **viewlift:embed** - **Viidea** - **viki** - **viki:channel** - **vimeo** - **vimeo:album** - **vimeo:channel** - **vimeo:group** - **vimeo:likes**: Vimeo user likes - **vimeo:ondemand** - **vimeo:review**: Review pages on vimeo - **vimeo:user** - **vimeo:watchlater**: Vimeo watch later list, "vimeowatchlater" keyword (requires authentication) - **Vimm:recording** - **Vimm:stream** - **Vimple**: Vimple - one-click video hosting - **Vine** - **vine:user** - **Viqeo** - **Viu** - **viu:ott** - **viu:playlist** - **Vivo**: vivo.sx - **vk**: VK - **vk:uservideos**: VK - User's Videos - **vk:wallpost** - **vlive** - **vlive:channel** - **vlive:post** - **vm.tiktok** - **Vodlocker** - **VODPl** - **VODPlatform** - **VoiceRepublic** - **voicy** - **voicy:channel** - **Voot** - **VootSeries** - **VoxMedia** - **VoxMediaVolume** - **vpro**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl - **Vrak** - **VRT**: VRT NWS, Flanders News, Flandern Info and Sporza - **VrtNU**: VrtNU.be - **vrv** - **vrv:series** - **VShare** - **VTM** - **VTXTV** - **VuClip** - **Vupload** - **VVVVID** - **VVVVIDShow** - **VyboryMos** - **Vzaar** - **Wakanim** - **Walla** - **WalyTV** - **wasdtv:clip** - **wasdtv:record** - **wasdtv:stream** - **washingtonpost** - **washingtonpost:article** - **wat.tv** - **WatchBox** - **WatchIndianPorn**: Watch Indian Porn - **WDR** - **wdr:mobile** (Currently broken) - **WDRElefant** - **WDRPage** - **web.archive:youtube**: web.archive.org saved youtube videos, "ytarchive:" prefix - **Webcaster** - **WebcasterFeed** - **WebOfStories** - **WebOfStoriesPlaylist** - **Weibo** - **WeiboMobile** - **WeiqiTV**: WQTV - **whowatch** - **Willow** - **WimTV** - **Wistia** - **WistiaPlaylist** - **wnl**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl - **WorldStarHipHop** - **wppilot** - **wppilot:channels** - **WSJ**: Wall Street Journal - **WSJArticle** - **WWE** - **XBef** - **XboxClips** - **XFileShare**: XFileShare based sites: Aparat, ClipWatching, GoUnlimited, GoVid, HolaVid, Streamty, TheVideoBee, Uqload, VidBom, vidlo, VidLocker, VidShare, VUp, WolfStream, XVideoSharing - **XHamster** - **XHamsterEmbed** - **XHamsterUser** - **xiami:album**: 虾米音乐 - 专辑 - **xiami:artist**: 虾米音乐 - 歌手 - **xiami:collection**: 虾米音乐 - 精选集 - **xiami:song**: 虾米音乐 - **ximalaya**: 喜马拉雅FM - **ximalaya:album**: 喜马拉雅FM 专辑 - **xinpianchang**: xinpianchang.com - **XMinus** - **XNXX** - **Xstream** - **XTube** - **XTubeUser**: XTube user profile - **Xuite**: 隨意窩Xuite影音 - **XVideos** - **XXXYMovies** - **Yahoo**: Yahoo screen and movies - **yahoo:gyao** - **yahoo:gyao:player** - **yahoo:japannews**: Yahoo! Japan News - **YandexDisk** - **yandexmusic:album**: Яндекс.Музыка - Альбом - **yandexmusic:artist:albums**: Яндекс.Музыка - Артист - Альбомы - **yandexmusic:artist:tracks**: Яндекс.Музыка - Артист - Треки - **yandexmusic:playlist**: Яндекс.Музыка - Плейлист - **yandexmusic:track**: Яндекс.Музыка - Трек - **YandexVideo** - **YandexVideoPreview** - **YapFiles** - **YesJapan** - **yinyuetai:video**: 音悦Tai - **Ynet** - **YouJizz** - **youku**: 优酷 - **youku:show** - **YouNowChannel** - **YouNowLive** - **YouNowMoment** - **YouPorn** - **YourPorn** - **YourUpload** - **youtube**: YouTube - **youtube:favorites**: YouTube liked videos; ":ytfav" keyword (requires cookies) - **youtube:history**: Youtube watch history; ":ythis" keyword (requires cookies) - **youtube:music:search_url**: YouTube music search URLs with selectable sections (Eg: #songs) - **youtube:playlist**: YouTube playlists - **youtube:recommended**: YouTube recommended videos; ":ytrec" keyword - **youtube:search**: YouTube search; "ytsearch:" prefix - **youtube:search:date**: YouTube search, newest videos first; "ytsearchdate:" prefix - **youtube:search_url**: YouTube search URLs with sorting and filter support - **youtube:subscriptions**: YouTube subscriptions feed; ":ytsubs" keyword (requires cookies) - **youtube:tab**: YouTube Tabs - **youtube:user**: YouTube user videos; "ytuser:" prefix - **youtube:watchlater**: Youtube watch later list; ":ytwatchlater" keyword (requires cookies) - **YoutubeLivestreamEmbed**: YouTube livestream embeds - **YoutubeYtBe**: youtu.be - **Zapiks** - **Zattoo** - **ZattooLive** - **ZattooMovies** - **ZattooRecordings** - **ZDF** - **ZDFChannel** - **Zee5** - **zee5:series** - **ZenYandex** - **ZenYandexChannel** - **Zhihu** - **zingmp3**: zingmp3.vn - **zingmp3:album** - **zoom** - **Zype** yt-dlp-2022.04.08/test/000077500000000000000000000000001422400336200142755ustar00rootroot00000000000000yt-dlp-2022.04.08/test/__init__.py000066400000000000000000000000001422400336200163740ustar00rootroot00000000000000yt-dlp-2022.04.08/test/helper.py000066400000000000000000000275071422400336200161410ustar00rootroot00000000000000from __future__ import unicode_literals import errno import io import hashlib import json import os.path import re import types import ssl import sys import yt_dlp.extractor from yt_dlp import YoutubeDL from yt_dlp.compat import ( compat_os_name, compat_str, ) from yt_dlp.utils import ( preferredencoding, write_string, ) if 'pytest' in sys.modules: import pytest is_download_test = pytest.mark.download else: def is_download_test(testClass): return testClass def get_params(override=None): PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'parameters.json') LOCAL_PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'local_parameters.json') with io.open(PARAMETERS_FILE, encoding='utf-8') as pf: parameters = json.load(pf) if os.path.exists(LOCAL_PARAMETERS_FILE): with io.open(LOCAL_PARAMETERS_FILE, encoding='utf-8') as pf: parameters.update(json.load(pf)) if override: parameters.update(override) return parameters def try_rm(filename): """ Remove a file if it exists """ try: os.remove(filename) except OSError as ose: if ose.errno != errno.ENOENT: raise def report_warning(message): ''' Print the message to stderr, it will be prefixed with 'WARNING:' If stderr is a tty file the 'WARNING:' will be colored ''' if sys.stderr.isatty() and compat_os_name != 'nt': _msg_header = '\033[0;33mWARNING:\033[0m' else: _msg_header = 'WARNING:' output = '%s %s\n' % (_msg_header, message) if 'b' in getattr(sys.stderr, 'mode', '') or sys.version_info[0] < 3: output = output.encode(preferredencoding()) sys.stderr.write(output) class FakeYDL(YoutubeDL): def __init__(self, override=None): # Different instances of the downloader can't share the same dictionary # some test set the "sublang" parameter, which would break the md5 checks. params = get_params(override=override) super(FakeYDL, self).__init__(params, auto_init=False) self.result = [] def to_screen(self, s, skip_eol=None): print(s) def trouble(self, s, tb=None): raise Exception(s) def download(self, x): self.result.append(x) def expect_warning(self, regex): # Silence an expected warning matching a regex old_report_warning = self.report_warning def report_warning(self, message): if re.match(regex, message): return old_report_warning(message) self.report_warning = types.MethodType(report_warning, self) def gettestcases(include_onlymatching=False): for ie in yt_dlp.extractor.gen_extractors(): for tc in ie.get_testcases(include_onlymatching): yield tc md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest() def expect_value(self, got, expected, field): if isinstance(expected, compat_str) and expected.startswith('re:'): match_str = expected[len('re:'):] match_rex = re.compile(match_str) self.assertTrue( isinstance(got, compat_str), 'Expected a %s object, but got %s for field %s' % ( compat_str.__name__, type(got).__name__, field)) self.assertTrue( match_rex.match(got), 'field %s (value: %r) should match %r' % (field, got, match_str)) elif isinstance(expected, compat_str) and expected.startswith('startswith:'): start_str = expected[len('startswith:'):] self.assertTrue( isinstance(got, compat_str), 'Expected a %s object, but got %s for field %s' % ( compat_str.__name__, type(got).__name__, field)) self.assertTrue( got.startswith(start_str), 'field %s (value: %r) should start with %r' % (field, got, start_str)) elif isinstance(expected, compat_str) and expected.startswith('contains:'): contains_str = expected[len('contains:'):] self.assertTrue( isinstance(got, compat_str), 'Expected a %s object, but got %s for field %s' % ( compat_str.__name__, type(got).__name__, field)) self.assertTrue( contains_str in got, 'field %s (value: %r) should contain %r' % (field, got, contains_str)) elif isinstance(expected, type): self.assertTrue( isinstance(got, expected), 'Expected type %r for field %s, but got value %r of type %r' % (expected, field, got, type(got))) elif isinstance(expected, dict) and isinstance(got, dict): expect_dict(self, got, expected) elif isinstance(expected, list) and isinstance(got, list): self.assertEqual( len(expected), len(got), 'Expect a list of length %d, but got a list of length %d for field %s' % ( len(expected), len(got), field)) for index, (item_got, item_expected) in enumerate(zip(got, expected)): type_got = type(item_got) type_expected = type(item_expected) self.assertEqual( type_expected, type_got, 'Type mismatch for list item at index %d for field %s, expected %r, got %r' % ( index, field, type_expected, type_got)) expect_value(self, item_got, item_expected, field) else: if isinstance(expected, compat_str) and expected.startswith('md5:'): self.assertTrue( isinstance(got, compat_str), 'Expected field %s to be a unicode object, but got value %r of type %r' % (field, got, type(got))) got = 'md5:' + md5(got) elif isinstance(expected, compat_str) and re.match(r'^(?:min|max)?count:\d+', expected): self.assertTrue( isinstance(got, (list, dict)), 'Expected field %s to be a list or a dict, but it is of type %s' % ( field, type(got).__name__)) op, _, expected_num = expected.partition(':') expected_num = int(expected_num) if op == 'mincount': assert_func = assertGreaterEqual msg_tmpl = 'Expected %d items in field %s, but only got %d' elif op == 'maxcount': assert_func = assertLessEqual msg_tmpl = 'Expected maximum %d items in field %s, but got %d' elif op == 'count': assert_func = assertEqual msg_tmpl = 'Expected exactly %d items in field %s, but got %d' else: assert False assert_func( self, len(got), expected_num, msg_tmpl % (expected_num, field, len(got))) return self.assertEqual( expected, got, 'Invalid value for field %s, expected %r, got %r' % (field, expected, got)) def expect_dict(self, got_dict, expected_dict): for info_field, expected in expected_dict.items(): got = got_dict.get(info_field) expect_value(self, got, expected, info_field) def sanitize_got_info_dict(got_dict): IGNORED_FIELDS = ( *YoutubeDL._format_fields, # Lists 'formats', 'thumbnails', 'subtitles', 'automatic_captions', 'comments', 'entries', # Auto-generated 'autonumber', 'playlist', 'format_index', 'video_ext', 'audio_ext', 'duration_string', 'epoch', 'fulltitle', 'extractor', 'extractor_key', 'filepath', 'infojson_filename', 'original_url', 'n_entries', # Only live_status needs to be checked 'is_live', 'was_live', ) IGNORED_PREFIXES = ('', 'playlist', 'requested', 'webpage') def sanitize(key, value): if isinstance(value, str) and len(value) > 100 and key != 'thumbnail': return f'md5:{md5(value)}' elif isinstance(value, list) and len(value) > 10: return f'count:{len(value)}' elif key.endswith('_count') and isinstance(value, int): return int return value test_info_dict = { key: sanitize(key, value) for key, value in got_dict.items() if value is not None and key not in IGNORED_FIELDS and not any( key.startswith(f'{prefix}_') for prefix in IGNORED_PREFIXES) } # display_id may be generated from id if test_info_dict.get('display_id') == test_info_dict.get('id'): test_info_dict.pop('display_id') return test_info_dict def expect_info_dict(self, got_dict, expected_dict): expect_dict(self, got_dict, expected_dict) # Check for the presence of mandatory fields if got_dict.get('_type') not in ('playlist', 'multi_video'): mandatory_fields = ['id', 'title'] if expected_dict.get('ext'): mandatory_fields.extend(('url', 'ext')) for key in mandatory_fields: self.assertTrue(got_dict.get(key), 'Missing mandatory field %s' % key) # Check for mandatory fields that are automatically set by YoutubeDL for key in ['webpage_url', 'extractor', 'extractor_key']: self.assertTrue(got_dict.get(key), 'Missing field: %s' % key) test_info_dict = sanitize_got_info_dict(got_dict) missing_keys = set(test_info_dict.keys()) - set(expected_dict.keys()) if missing_keys: def _repr(v): if isinstance(v, compat_str): return "'%s'" % v.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n') elif isinstance(v, type): return v.__name__ else: return repr(v) info_dict_str = '' if len(missing_keys) != len(expected_dict): info_dict_str += ''.join( ' %s: %s,\n' % (_repr(k), _repr(v)) for k, v in test_info_dict.items() if k not in missing_keys) if info_dict_str: info_dict_str += '\n' info_dict_str += ''.join( ' %s: %s,\n' % (_repr(k), _repr(test_info_dict[k])) for k in missing_keys) write_string( '\n\'info_dict\': {\n' + info_dict_str + '},\n', out=sys.stderr) self.assertFalse( missing_keys, 'Missing keys in test definition: %s' % ( ', '.join(sorted(missing_keys)))) def assertRegexpMatches(self, text, regexp, msg=None): if hasattr(self, 'assertRegexp'): return self.assertRegexp(text, regexp, msg) else: m = re.match(regexp, text) if not m: note = 'Regexp didn\'t match: %r not found' % (regexp) if len(text) < 1000: note += ' in %r' % text if msg is None: msg = note else: msg = note + ', ' + msg self.assertTrue(m, msg) def assertGreaterEqual(self, got, expected, msg=None): if not (got >= expected): if msg is None: msg = '%r not greater than or equal to %r' % (got, expected) self.assertTrue(got >= expected, msg) def assertLessEqual(self, got, expected, msg=None): if not (got <= expected): if msg is None: msg = '%r not less than or equal to %r' % (got, expected) self.assertTrue(got <= expected, msg) def assertEqual(self, got, expected, msg=None): if not (got == expected): if msg is None: msg = '%r not equal to %r' % (got, expected) self.assertTrue(got == expected, msg) def expect_warnings(ydl, warnings_re): real_warning = ydl.report_warning def _report_warning(w): if not any(re.search(w_re, w) for w_re in warnings_re): real_warning(w) ydl.report_warning = _report_warning def http_server_port(httpd): if os.name == 'java' and isinstance(httpd.socket, ssl.SSLSocket): # In Jython SSLSocket is not a subclass of socket.socket sock = httpd.socket.sock else: sock = httpd.socket return sock.getsockname()[1] yt-dlp-2022.04.08/test/parameters.json000066400000000000000000000022641422400336200173370ustar00rootroot00000000000000{ "check_formats": false, "consoletitle": false, "continuedl": true, "forcedescription": false, "forcefilename": false, "forceformat": false, "forcethumbnail": false, "forcetitle": false, "forceurl": false, "force_write_download_archive": false, "format": "b/bv", "ignoreerrors": false, "listformats": null, "logtostderr": false, "matchtitle": null, "max_downloads": null, "overwrites": null, "nopart": false, "noprogress": false, "outtmpl": "%(id)s.%(ext)s", "password": null, "playliststart": 1, "prefer_free_formats": false, "quiet": false, "ratelimit": null, "rejecttitle": null, "retries": 10, "simulate": false, "subtitleslang": null, "subtitlesformat": "best", "test": true, "updatetime": true, "usenetrc": false, "username": null, "verbose": true, "writedescription": false, "writeinfojson": true, "writeannotations": false, "writelink": false, "writeurllink": false, "writewebloclink": false, "writedesktoplink": false, "writesubtitles": false, "allsubtitles": false, "listsubtitles": false, "fixup": "never" } yt-dlp-2022.04.08/test/swftests.unused/000077500000000000000000000000001422400336200174615ustar00rootroot00000000000000yt-dlp-2022.04.08/test/swftests.unused/.gitignore000066400000000000000000000000061422400336200214450ustar00rootroot00000000000000*.swf yt-dlp-2022.04.08/test/swftests.unused/ArrayAccess.as000066400000000000000000000006511422400336200222100ustar00rootroot00000000000000// input: [["a", "b", "c", "d"]] // output: ["c", "b", "a", "d"] package { public class ArrayAccess { public static function main(ar:Array):Array { var aa:ArrayAccess = new ArrayAccess(); return aa.f(ar, 2); } private function f(ar:Array, num:Number):Array{ var x:String = ar[0]; var y:String = ar[num % ar.length]; ar[0] = y; ar[num] = x; return ar; } } } yt-dlp-2022.04.08/test/swftests.unused/ClassCall.as000066400000000000000000000004171422400336200216510ustar00rootroot00000000000000// input: [] // output: 121 package { public class ClassCall { public static function main():int{ var f:OtherClass = new OtherClass(); return f.func(100,20); } } } class OtherClass { public function func(x: int, y: int):int { return x+y+1; } } yt-dlp-2022.04.08/test/swftests.unused/ClassConstruction.as000066400000000000000000000002651422400336200234710ustar00rootroot00000000000000// input: [] // output: 0 package { public class ClassConstruction { public static function main():int{ var f:Foo = new Foo(); return 0; } } } class Foo { } yt-dlp-2022.04.08/test/swftests.unused/ConstArrayAccess.as000066400000000000000000000005301422400336200232130ustar00rootroot00000000000000// input: [] // output: 4 package { public class ConstArrayAccess { private static const x:int = 2; private static const ar:Array = ["42", "3411"]; public static function main():int{ var c:ConstArrayAccess = new ConstArrayAccess(); return c.f(); } public function f(): int { return ar[1].length; } } } yt-dlp-2022.04.08/test/swftests.unused/ConstantInt.as000066400000000000000000000002451422400336200222530ustar00rootroot00000000000000// input: [] // output: 2 package { public class ConstantInt { private static const x:int = 2; public static function main():int{ return x; } } } yt-dlp-2022.04.08/test/swftests.unused/DictCall.as000066400000000000000000000002401422400336200214610ustar00rootroot00000000000000// input: [{"x": 1, "y": 2}] // output: 3 package { public class DictCall { public static function main(d:Object):int{ return d.x + d.y; } } } yt-dlp-2022.04.08/test/swftests.unused/EqualsOperator.as000066400000000000000000000002231422400336200227510ustar00rootroot00000000000000// input: [] // output: false package { public class EqualsOperator { public static function main():Boolean{ return 1 == 2; } } } yt-dlp-2022.04.08/test/swftests.unused/LocalVars.as000066400000000000000000000003421422400336200216730ustar00rootroot00000000000000// input: [1, 2] // output: 3 package { public class LocalVars { public static function main(a:int, b:int):int{ var c:int = a + b + b; var d:int = c - b; var e:int = d; return e; } } } yt-dlp-2022.04.08/test/swftests.unused/MemberAssignment.as000066400000000000000000000006001422400336200232420ustar00rootroot00000000000000// input: [1] // output: 2 package { public class MemberAssignment { public var v:int; public function g():int { return this.v; } public function f(a:int):int{ this.v = a; return this.v + this.g(); } public static function main(a:int): int { var v:MemberAssignment = new MemberAssignment(); return v.f(a); } } } yt-dlp-2022.04.08/test/swftests.unused/NeOperator.as000066400000000000000000000006251422400336200220670ustar00rootroot00000000000000// input: [] // output: 123 package { public class NeOperator { public static function main(): int { var res:int = 0; if (1 != 2) { res += 3; } else { res += 4; } if (2 != 2) { res += 10; } else { res += 20; } if (9 == 9) { res += 100; } return res; } } } yt-dlp-2022.04.08/test/swftests.unused/PrivateCall.as000066400000000000000000000004541422400336200222170ustar00rootroot00000000000000// input: [] // output: 9 package { public class PrivateCall { public static function main():int{ var f:OtherClass = new OtherClass(); return f.func(); } } } class OtherClass { private function pf():int { return 9; } public function func():int { return this.pf(); } } yt-dlp-2022.04.08/test/swftests.unused/PrivateVoidCall.as000066400000000000000000000005111422400336200230330ustar00rootroot00000000000000// input: [] // output: 9 package { public class PrivateVoidCall { public static function main():int{ var f:OtherClass = new OtherClass(); f.func(); return 9; } } } class OtherClass { private function pf():void { ; } public function func():void { this.pf(); } } yt-dlp-2022.04.08/test/swftests.unused/StaticAssignment.as000066400000000000000000000002701422400336200232650ustar00rootroot00000000000000// input: [1] // output: 1 package { public class StaticAssignment { public static var v:int; public static function main(a:int):int{ v = a; return v; } } } yt-dlp-2022.04.08/test/swftests.unused/StaticRetrieval.as000066400000000000000000000003421422400336200231120ustar00rootroot00000000000000// input: [] // output: 1 package { public class StaticRetrieval { public static var v:int; public static function main():int{ if (v) { return 0; } else { return 1; } } } } yt-dlp-2022.04.08/test/swftests.unused/StringBasics.as000066400000000000000000000002511422400336200223770ustar00rootroot00000000000000// input: [] // output: 3 package { public class StringBasics { public static function main():int{ var s:String = "abc"; return s.length; } } } yt-dlp-2022.04.08/test/swftests.unused/StringCharCodeAt.as000066400000000000000000000003161422400336200231320ustar00rootroot00000000000000// input: [] // output: 9897 package { public class StringCharCodeAt { public static function main():int{ var s:String = "abc"; return s.charCodeAt(1) * 100 + s.charCodeAt(); } } } yt-dlp-2022.04.08/test/swftests.unused/StringConversion.as000066400000000000000000000002621422400336200233220ustar00rootroot00000000000000// input: [] // output: 2 package { public class StringConversion { public static function main():int{ var s:String = String(99); return s.length; } } } yt-dlp-2022.04.08/test/test_InfoExtractor.py000066400000000000000000002465371422400336200205160ustar00rootroot00000000000000#!/usr/bin/env python3 from __future__ import unicode_literals # Allow direct execution import io import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL, expect_dict, expect_value, http_server_port from yt_dlp.compat import compat_etree_fromstring, compat_http_server from yt_dlp.extractor.common import InfoExtractor from yt_dlp.extractor import YoutubeIE, get_info_extractor from yt_dlp.utils import encode_data_uri, strip_jsonp, ExtractorError, RegexNotFoundError import threading TEAPOT_RESPONSE_STATUS = 418 TEAPOT_RESPONSE_BODY = "

    418 I'm a teapot

    " class InfoExtractorTestRequestHandler(compat_http_server.BaseHTTPRequestHandler): def log_message(self, format, *args): pass def do_GET(self): if self.path == '/teapot': self.send_response(TEAPOT_RESPONSE_STATUS) self.send_header('Content-Type', 'text/html; charset=utf-8') self.end_headers() self.wfile.write(TEAPOT_RESPONSE_BODY.encode()) else: assert False class DummyIE(InfoExtractor): pass class TestInfoExtractor(unittest.TestCase): def setUp(self): self.ie = DummyIE(FakeYDL()) def test_ie_key(self): self.assertEqual(get_info_extractor(YoutubeIE.ie_key()), YoutubeIE) def test_html_search_regex(self): html = '

    Watch this video

    ' search = lambda re, *args: self.ie._html_search_regex(re, html, *args) self.assertEqual(search(r'

    (.+?)

    ', 'foo'), 'Watch this video') def test_opengraph(self): ie = self.ie html = ''' ''' self.assertEqual(ie._og_search_title(html), 'Foo') self.assertEqual(ie._og_search_description(html), 'Some video\'s description ') self.assertEqual(ie._og_search_thumbnail(html), 'http://domain.com/pic.jpg?key1=val1&key2=val2') self.assertEqual(ie._og_search_video_url(html, default=None), None) self.assertEqual(ie._og_search_property('foobar', html), 'Foo') self.assertEqual(ie._og_search_property('test1', html), 'foo > < bar') self.assertEqual(ie._og_search_property('test2', html), 'foo >//< bar') self.assertEqual(ie._og_search_property('test3', html), 'Ill-formatted opengraph') self.assertEqual(ie._og_search_property(('test0', 'test1'), html), 'foo > < bar') self.assertRaises(RegexNotFoundError, ie._og_search_property, 'test0', html, None, fatal=True) self.assertRaises(RegexNotFoundError, ie._og_search_property, ('test0', 'test00'), html, None, fatal=True) def test_html_search_meta(self): ie = self.ie html = ''' ''' self.assertEqual(ie._html_search_meta('a', html), '1') self.assertEqual(ie._html_search_meta('b', html), '2') self.assertEqual(ie._html_search_meta('c', html), '3') self.assertEqual(ie._html_search_meta('d', html), '4') self.assertEqual(ie._html_search_meta('e', html), '5') self.assertEqual(ie._html_search_meta('f', html), '6') self.assertEqual(ie._html_search_meta(('a', 'b', 'c'), html), '1') self.assertEqual(ie._html_search_meta(('c', 'b', 'a'), html), '3') self.assertEqual(ie._html_search_meta(('z', 'x', 'c'), html), '3') 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): _TESTS = [ # https://github.com/ytdl-org/youtube-dl/issues/23306 ( r'''''', { '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, }, {}, ), ( r'''''', { 'timestamp': 1636523400, 'title': 'md5:91fe569e952e4d146485740ae927662b', }, {'expected_type': 'NewsArticle'}, ), ( r''' ''', { 'chapters': [ {"title": "Explosie Turnhout", "start_time": 70, "end_time": 440}, {"title": "Jaarwisseling", "start_time": 440, "end_time": 1179}, {"title": "Natuurbranden Colorado", "start_time": 1179, "end_time": 1263}, {"title": "Klimaatverandering", "start_time": 1263, "end_time": 1367}, {"title": "Zacht weer", "start_time": 1367, "end_time": 1383}, {"title": "Financiële balans", "start_time": 1383, "end_time": 1484}, {"title": "Club Brugge", "start_time": 1484, "end_time": 1575}, {"title": "Mentale gezondheid bij topsporters", "start_time": 1575, "end_time": 1728}, {"title": "Olympische Winterspelen", "start_time": 1728, "end_time": 1873}, {"title": "Sober oudjaar in Nederland", "start_time": 1873, "end_time": 2079.23} ], 'title': 'Het journaal - Aflevering 365 (Seizoen 2021)' }, {} ), ( # test multiple thumbnails in a list r''' ''', { 'thumbnails': [{'url': 'https://www.rainews.it/cropgd/640x360/dl/img/2021/12/30/1640886376927_GettyImages.jpg'}], }, {}, ), ( # test single thumbnail r''' ''', { 'thumbnails': [{'url': 'https://www.rainews.it/cropgd/640x360/dl/img/2021/12/30/1640886376927_GettyImages.jpg'}], }, {}, ) ] for html, expected_dict, search_json_ld_kwargs in _TESTS: expect_dict( self, self.ie._search_json_ld(html, None, **search_json_ld_kwargs), expected_dict ) def test_download_json(self): uri = encode_data_uri(b'{"foo": "blah"}', 'application/json') self.assertEqual(self.ie._download_json(uri, None), {'foo': 'blah'}) uri = encode_data_uri(b'callback({"foo": "blah"})', 'application/javascript') self.assertEqual(self.ie._download_json(uri, None, transform_source=strip_jsonp), {'foo': 'blah'}) uri = encode_data_uri(b'{"foo": invalid}', 'application/json') self.assertRaises(ExtractorError, self.ie._download_json, uri, None) 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'