mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-15 08:39:09 +03:00
Compare commits
22
Commits
e8de28e23c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d6b8c8cd1 | ||
|
|
15941bd48f | ||
|
|
d798b9b8fb | ||
|
|
fdcc954df4 | ||
|
|
07591f601e | ||
|
|
aaf7405ba3 | ||
|
|
1f1101d0dc | ||
|
|
a8be438aac | ||
|
|
69ea200067 | ||
|
|
93ceb95cdf | ||
|
|
aefce1eea4 | ||
|
|
d9813a3da6 | ||
|
|
6a188aed91 | ||
|
|
59d9ae606a | ||
|
|
1328586f72 | ||
|
|
b3854cc41b | ||
|
|
981190089f | ||
|
|
fdec00e0bf | ||
|
|
997fa14084 | ||
|
|
b6590aaa1e | ||
|
|
bed3d58c5c | ||
|
|
8c1f07d813 |
@@ -43,45 +43,61 @@ jobs:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
allow-prereleases: true
|
||||
|
||||
- name: Install Deno
|
||||
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
|
||||
with:
|
||||
deno-version: '2.3.0' # minimum supported version
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||
with:
|
||||
bun-version: '1.2.11' # minimum supported version
|
||||
no-cache: true
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: '22.0' # minimum supported version
|
||||
|
||||
- name: Install QuickJS (Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip
|
||||
unzip quickjs.zip qjs
|
||||
sudo install qjs /usr/local/bin/qjs
|
||||
wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip
|
||||
unzip quickjs.zip qjs
|
||||
sudo install qjs /usr/local/bin/qjs
|
||||
|
||||
- name: Install QuickJS (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip
|
||||
unzip quickjs.zip
|
||||
- name: Install test requirements
|
||||
shell: bash
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip
|
||||
unzip quickjs.zip
|
||||
|
||||
- name: Install test requirements (cpython)
|
||||
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/default.txt"
|
||||
|
||||
- name: Install test requirements (PyPy)
|
||||
if: ${{ startsWith(matrix.python-version, 'pypy') }}
|
||||
run: |
|
||||
# Upgrading/downgrading pip on Windows with actions/setup-python's PyPy can cause breakage
|
||||
# See https://github.com/actions/setup-python/issues/1348
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/default.txt"
|
||||
|
||||
- name: Run tests
|
||||
timeout-minutes: 15
|
||||
shell: bash
|
||||
|
||||
@@ -85,7 +85,8 @@ jobs:
|
||||
- name: Install test requirements (PyPy)
|
||||
if: ${{ startsWith(matrix.python-version, 'pypy') }}
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/pip.txt"
|
||||
# Upgrading/downgrading pip on Windows with actions/setup-python's PyPy can cause breakage
|
||||
# See https://github.com/actions/setup-python/issues/1348
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/default.txt"
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ jobs:
|
||||
fi
|
||||
printf '\n\n%s\n\n%s%s%s\n\n---\n' \
|
||||
"#### A description of the various files is in the [README](https://github.com/${REPOSITORY}#release-files)" \
|
||||
"The zipimport Unix executable contains code licensed under ISC and MIT. " \
|
||||
"The zipimport Unix executable and release tarball contain code licensed under ISC and MIT. " \
|
||||
"The PyInstaller-bundled executables are subject to these and other licenses, all of which are compiled in " \
|
||||
"[THIRD_PARTY_LICENSES.txt](https://github.com/${BASE_REPO}/blob/${HEAD_SHA}/THIRD_PARTY_LICENSES.txt)" >> ./RELEASE_NOTES
|
||||
python ./devscripts/make_changelog.py -vv --collapsible >> ./RELEASE_NOTES
|
||||
|
||||
@@ -886,3 +886,16 @@ MemoKing34
|
||||
Suntooth
|
||||
Ventriduct
|
||||
vpertys
|
||||
billauer
|
||||
BOplaid
|
||||
dialmaster
|
||||
dreammu
|
||||
FranciscoPombal
|
||||
HybridDog
|
||||
longcharmroeun
|
||||
Masterjun3
|
||||
noseb13eds
|
||||
Sec-Wayne
|
||||
selfhoster1312
|
||||
tcely
|
||||
tewhalen
|
||||
|
||||
@@ -4,6 +4,101 @@
|
||||
# To create a release, dispatch the https://github.com/yt-dlp/yt-dlp/actions/workflows/release.yml workflow on master
|
||||
-->
|
||||
|
||||
### 2026.07.04
|
||||
|
||||
#### Important changes
|
||||
- **The minimum *recommended* Python version has been raised to 3.11**
|
||||
- Since Python 3.10 will reach its end-of-life in October 2026, support for it will be dropped soon. [Read more](https://github.com/yt-dlp/yt-dlp/issues/16916)
|
||||
- **The official Windows release binaries will soon require Windows 10 or later.** [Read more](https://github.com/yt-dlp/yt-dlp/issues/16917)
|
||||
- Security: [[CVE-2026-55404](https://nvd.nist.gov/vuln/detail/CVE-2026-55404)] [Downstream command injection via improper sanitization of --write-link output](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-6v4j-43gg-vj32)
|
||||
- Shortcut file data is now properly validated and sanitized when the `--write-link` options are used
|
||||
|
||||
#### Core changes
|
||||
- [Always include warnings in debug output](https://github.com/yt-dlp/yt-dlp/commit/d23e6f5a387d5933bc24e1eb5437da8fd563c1f0) ([#17059](https://github.com/yt-dlp/yt-dlp/issues/17059)) by [bashonly](https://github.com/bashonly)
|
||||
- [Fix `allow-unsafe-ext` compat option](https://github.com/yt-dlp/yt-dlp/commit/e47691215f75fe7e9684080d17fadf340c9a8450) ([#16920](https://github.com/yt-dlp/yt-dlp/issues/16920)) by [bashonly](https://github.com/bashonly)
|
||||
- [Raise minimum recommended Python version to 3.11](https://github.com/yt-dlp/yt-dlp/commit/7b03011294c0210802ffc901390006c39152b999) ([#17034](https://github.com/yt-dlp/yt-dlp/issues/17034)) by [bashonly](https://github.com/bashonly)
|
||||
- [Validate and escape values in `--write-link` output](https://github.com/yt-dlp/yt-dlp/commit/b6590aaa1e3808155d69c9a79a797ae484163789) by [bashonly](https://github.com/bashonly)
|
||||
- **cookies**: [Use `'` instead of `"` for SQL string quoting](https://github.com/yt-dlp/yt-dlp/commit/7a569456f24fd9afcda09ae55c10d3bbd03f46ef) ([#17078](https://github.com/yt-dlp/yt-dlp/issues/17078)) by [Grub4K](https://github.com/Grub4K)
|
||||
- **utils**
|
||||
- [Deprecate `make_dir` in favor of `make_parent_dirs`](https://github.com/yt-dlp/yt-dlp/commit/b05b408d10ebf8f4c47c0db1236eb713b6ad7ab6) ([#16931](https://github.com/yt-dlp/yt-dlp/issues/16931)) by [doe1080](https://github.com/doe1080)
|
||||
- `HTTPHeaderDict`: [Fix `__ior__`](https://github.com/yt-dlp/yt-dlp/commit/cb309b3293c9919cfb55f5d9ffa2c8c109a5f1eb) ([#16930](https://github.com/yt-dlp/yt-dlp/issues/16930)) by [doe1080](https://github.com/doe1080)
|
||||
- `parse_duration`: [Return `int` when appropriate](https://github.com/yt-dlp/yt-dlp/commit/e584a65f2a0feee0c6c363b3309e9ebd6065f6b4) ([#13899](https://github.com/yt-dlp/yt-dlp/issues/13899)) by [doe1080](https://github.com/doe1080)
|
||||
- `parse_resolution`: [Support fps suffixes](https://github.com/yt-dlp/yt-dlp/commit/1249676e98aecf2131901f10f0230fb5e1bdc17e) ([#17073](https://github.com/yt-dlp/yt-dlp/issues/17073)) by [doe1080](https://github.com/doe1080)
|
||||
- `pkcs1pad`: [Fix invalid PKCS#1 v1.5 padding bytes](https://github.com/yt-dlp/yt-dlp/commit/25a05fc0e24ebda38578e87c3f6772a149522786) ([#17035](https://github.com/yt-dlp/yt-dlp/issues/17035)) by [doe1080](https://github.com/doe1080)
|
||||
- `qualities`: [Avoid repeated index lookups](https://github.com/yt-dlp/yt-dlp/commit/3cf981af60dd0b1b6c40807fb542d68ddb0a5f84) ([#17025](https://github.com/yt-dlp/yt-dlp/issues/17025)) by [doe1080](https://github.com/doe1080)
|
||||
- `random_user_agent`: [Bump version range 143-149 => 144-150](https://github.com/yt-dlp/yt-dlp/commit/d120d841dde18839f28cba4a8b0df6d3c4fc6761) ([#17117](https://github.com/yt-dlp/yt-dlp/issues/17117)) by [bashonly](https://github.com/bashonly), [dlp-bot](https://github.com/dlp-bot)
|
||||
|
||||
#### Extractor changes
|
||||
- [Always include `id` in request error output](https://github.com/yt-dlp/yt-dlp/commit/af8a3f34370c82f323ed30074e3fe741ebcc98ca) ([#17068](https://github.com/yt-dlp/yt-dlp/issues/17068)) by [bashonly](https://github.com/bashonly), [HybridDog](https://github.com/HybridDog)
|
||||
- [Fix request logging](https://github.com/yt-dlp/yt-dlp/commit/c13e2f8a20fc1fafb31cba4e6287c874bc0c0cc0) ([#17072](https://github.com/yt-dlp/yt-dlp/issues/17072)) by [bashonly](https://github.com/bashonly)
|
||||
- **arte**: [Fix playlist support](https://github.com/yt-dlp/yt-dlp/commit/16bdcc525e6a550781d65d6fed92a37800ad95e1) ([#13191](https://github.com/yt-dlp/yt-dlp/issues/13191)) by [1100101](https://github.com/1100101)
|
||||
- **bandcamp**: weekly: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/a541df1ea5a593abf3ceaf94ed806e4b52a2c459) ([#16925](https://github.com/yt-dlp/yt-dlp/issues/16925)) by [bashonly](https://github.com/bashonly) (With fixes in [9055188](https://github.com/yt-dlp/yt-dlp/commit/9055188250348c3e6e29eee53e5fb3dc2c951977))
|
||||
- **bilibili**: [Fix API extraction](https://github.com/yt-dlp/yt-dlp/commit/e8de28e23c1ecb4a12b2c3dec188c07e998c412c) ([#13730](https://github.com/yt-dlp/yt-dlp/issues/13730)) by [grqz](https://github.com/grqz)
|
||||
- **instagram**
|
||||
- [Detect when cookies are invalidated](https://github.com/yt-dlp/yt-dlp/commit/ac4c955ea93f35a3a426903141436a6468bddf9f) ([#17126](https://github.com/yt-dlp/yt-dlp/issues/17126)) by [bashonly](https://github.com/bashonly)
|
||||
- [Rework extractor](https://github.com/yt-dlp/yt-dlp/commit/f49b551a0c4c25358d2afaeda4ee63989d2d56ab) ([#17075](https://github.com/yt-dlp/yt-dlp/issues/17075)) by [bashonly](https://github.com/bashonly) (With fixes in [8b8e3e3](https://github.com/yt-dlp/yt-dlp/commit/8b8e3e3cb4d3ba0dedf7b1fd00ce68f07da7e588))
|
||||
- **linkedin**: [Remove broken login support](https://github.com/yt-dlp/yt-dlp/commit/a5e0f87140c6ea73ad3f34914339e873681b4dca) ([#17039](https://github.com/yt-dlp/yt-dlp/issues/17039)) by [0xvd](https://github.com/0xvd)
|
||||
- **mgtv**: [Fix VIP stream extraction](https://github.com/yt-dlp/yt-dlp/commit/6b67e1f2b77feb6d97852be08bfc2e0ab1c8aef0) ([#16982](https://github.com/yt-dlp/yt-dlp/issues/16982)) by [longcharmroeun](https://github.com/longcharmroeun)
|
||||
- **mxplayer**
|
||||
- [Fix extractors](https://github.com/yt-dlp/yt-dlp/commit/01f4f06fdd1e1e088981fa4af3422806aefa0c2a) ([#16988](https://github.com/yt-dlp/yt-dlp/issues/16988)) by [0xvd](https://github.com/0xvd)
|
||||
- [Rework extractors](https://github.com/yt-dlp/yt-dlp/commit/55a58debec7fa5bbaa119dfbc874fb84dd48c76e) ([#17018](https://github.com/yt-dlp/yt-dlp/issues/17018)) by [doe1080](https://github.com/doe1080)
|
||||
- **niconico**
|
||||
- [Fix error detection](https://github.com/yt-dlp/yt-dlp/commit/c4f94545c9d3ce356f2f3149c8fde2134073cee2) ([#16991](https://github.com/yt-dlp/yt-dlp/issues/16991)) by [doe1080](https://github.com/doe1080)
|
||||
- [Support shorts](https://github.com/yt-dlp/yt-dlp/commit/4af5541bb56b08d462f32773dfa15c207de13b74) ([#16992](https://github.com/yt-dlp/yt-dlp/issues/16992)) by [doe1080](https://github.com/doe1080)
|
||||
- **omnyfm**: [Add extractors](https://github.com/yt-dlp/yt-dlp/commit/fa383a9efa02c2f89aba315b17e47fb6bf9e5bee) ([#15942](https://github.com/yt-dlp/yt-dlp/issues/15942)) by [doe1080](https://github.com/doe1080)
|
||||
- **openrec**: [Rework extractors](https://github.com/yt-dlp/yt-dlp/commit/5aa335ecd9d12251b63b5afb23e166ea63cd7271) ([#16857](https://github.com/yt-dlp/yt-dlp/issues/16857)) by [doe1080](https://github.com/doe1080) (With fixes in [6694ef8](https://github.com/yt-dlp/yt-dlp/commit/6694ef82993396847e5a66802634c12944c42a5e))
|
||||
- **patreon**: [Support new URL format](https://github.com/yt-dlp/yt-dlp/commit/707537a03946fbc5707e22be429545c670cd8ec2) ([#16926](https://github.com/yt-dlp/yt-dlp/issues/16926)) by [0xvd](https://github.com/0xvd)
|
||||
- **peertube**: [Support password-protected videos](https://github.com/yt-dlp/yt-dlp/commit/a2483524fbf9c1f5406774622d8d048430b320e9) ([#16873](https://github.com/yt-dlp/yt-dlp/issues/16873)) by [selfhoster1312](https://github.com/selfhoster1312)
|
||||
- **periscope**: [Improve metadata extraction](https://github.com/yt-dlp/yt-dlp/commit/2b27a203f7573cb491c8bef77cb4d944cee6f8cf) ([#16084](https://github.com/yt-dlp/yt-dlp/issues/16084)) by [doe1080](https://github.com/doe1080)
|
||||
- **reddit**: [Remove broken login support](https://github.com/yt-dlp/yt-dlp/commit/917dad55e5b4dbf88d61541477d1830740ab3115) ([#17038](https://github.com/yt-dlp/yt-dlp/issues/17038)) by [0xvd](https://github.com/0xvd)
|
||||
- **soundcloud**
|
||||
- [Extract `uploader_url` for playlists](https://github.com/yt-dlp/yt-dlp/commit/f69e64a954524518add538648f6327611349ead4) ([#16842](https://github.com/yt-dlp/yt-dlp/issues/16842)) by [noseb13eds](https://github.com/noseb13eds)
|
||||
- [Extract comments](https://github.com/yt-dlp/yt-dlp/commit/785e507ef06b709f7f68744f29c16a5cdb8942f2) ([#16938](https://github.com/yt-dlp/yt-dlp/issues/16938)) by [0xvd](https://github.com/0xvd)
|
||||
- [Improve metadata extraction](https://github.com/yt-dlp/yt-dlp/commit/8bdfbfd4461a643e5c37a232b0efd7bcd86a3091) ([#17088](https://github.com/yt-dlp/yt-dlp/issues/17088)) by [noseb13eds](https://github.com/noseb13eds)
|
||||
- **streaks**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/26654a359d8d8dbe3c95b8fc6b0b09aca9a17fba) ([#16413](https://github.com/yt-dlp/yt-dlp/issues/16413)) by [doe1080](https://github.com/doe1080)
|
||||
- **svt**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/c84b2c6736ac5fac6c3eb9a0cbbeee4d6ed84fdd) ([#16288](https://github.com/yt-dlp/yt-dlp/issues/16288)) by [billauer](https://github.com/billauer), [dirkf](https://github.com/dirkf)
|
||||
- **telewebion**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/24aecad5df6090ef9c2a9deff27a7182c5164f07) ([#16986](https://github.com/yt-dlp/yt-dlp/issues/16986)) by [BOplaid](https://github.com/BOplaid)
|
||||
- **trovo**: [Remove dead extractors](https://github.com/yt-dlp/yt-dlp/commit/acc995cf9137918568857d39b68a94498726543a) ([#16353](https://github.com/yt-dlp/yt-dlp/issues/16353)) by [doe1080](https://github.com/doe1080)
|
||||
- **truth**: [Support share URLs](https://github.com/yt-dlp/yt-dlp/commit/e7b5d68f372499167fbf9711de42d3180a92e4de) ([#16096](https://github.com/yt-dlp/yt-dlp/issues/16096)) by [InvalidUsernameException](https://github.com/InvalidUsernameException)
|
||||
- **tviplayer**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/9ae7df9a22b29e2f81825230c9bba7d444190de0) ([#16527](https://github.com/yt-dlp/yt-dlp/issues/16527)) by [FranciscoPombal](https://github.com/FranciscoPombal)
|
||||
- **unsupported**: [Update unsupported sites](https://github.com/yt-dlp/yt-dlp/commit/5678b282e2a17a8181e682a9681461b9c82ff008) ([#17085](https://github.com/yt-dlp/yt-dlp/issues/17085)) by [bashonly](https://github.com/bashonly)
|
||||
- **wrestleuniverse**: vod: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/498e51f5da47539f3b4cc52ff85be5f33e7e9d2f) ([#16685](https://github.com/yt-dlp/yt-dlp/issues/16685)) by [0xvd](https://github.com/0xvd), [bashonly](https://github.com/bashonly), [Sec-Wayne](https://github.com/Sec-Wayne), [tewhalen](https://github.com/tewhalen)
|
||||
- **youtube**
|
||||
- [Fix `extract_relative_time` for abbreviated units](https://github.com/yt-dlp/yt-dlp/commit/6a24c96f7f61e5e651466cc3d4c6a30982318efe) ([#16687](https://github.com/yt-dlp/yt-dlp/issues/16687)) by [dialmaster](https://github.com/dialmaster)
|
||||
- [Fix detection of forced preroll wait time](https://github.com/yt-dlp/yt-dlp/commit/3c279b33cb6d1133624a468e71560c6a75039586) ([#17062](https://github.com/yt-dlp/yt-dlp/issues/17062)) by [bashonly](https://github.com/bashonly)
|
||||
- [Fix minor issues](https://github.com/yt-dlp/yt-dlp/commit/57528faa361314a69d47aead8f44c6a5380ca66a) ([#17060](https://github.com/yt-dlp/yt-dlp/issues/17060)) by [doe1080](https://github.com/doe1080)
|
||||
- [Support live adaptive formats](https://github.com/yt-dlp/yt-dlp/commit/8c1f07d813175cbcf84651f27a827bad84fd8184) ([#16771](https://github.com/yt-dlp/yt-dlp/issues/16771)) by [dreammu](https://github.com/dreammu)
|
||||
- tab
|
||||
- [Fix flat extraction of collaborators](https://github.com/yt-dlp/yt-dlp/commit/a75ba96fa48522738b91a907773a6fa9efe6e2d4) ([#17045](https://github.com/yt-dlp/yt-dlp/issues/17045)) by [bashonly](https://github.com/bashonly)
|
||||
- [Fix flat playlist metadata extraction](https://github.com/yt-dlp/yt-dlp/commit/ad6b5f4b3552472c17b3955a3f1525296bed6137) ([#16965](https://github.com/yt-dlp/yt-dlp/issues/16965)) by [bashonly](https://github.com/bashonly)
|
||||
- [Fix metadata extraction](https://github.com/yt-dlp/yt-dlp/commit/d6c411bcd0a0519a0db3b330df2530c8213eb9f0) ([#16976](https://github.com/yt-dlp/yt-dlp/issues/16976)) by [bashonly](https://github.com/bashonly)
|
||||
- [Fix pagination](https://github.com/yt-dlp/yt-dlp/commit/b23046bbc8e53f32a3853dc33138f2986f3aed06) ([#16948](https://github.com/yt-dlp/yt-dlp/issues/16948)) by [bashonly](https://github.com/bashonly)
|
||||
- **zan**: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/ad9a6f25f69344ebc060f7be223e5c19fc03e9b5) ([#16086](https://github.com/yt-dlp/yt-dlp/issues/16086)) by [doe1080](https://github.com/doe1080)
|
||||
- **zdf**: [Detect livestreams](https://github.com/yt-dlp/yt-dlp/commit/cfee151fcd9e1a0f4e5af9ca8440f1253cb70b88) ([#16954](https://github.com/yt-dlp/yt-dlp/issues/16954)) by [InvalidUsernameException](https://github.com/InvalidUsernameException)
|
||||
- **zoom**: clips: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/4a6296248fb6218d77221da4e5421c84bbc792d4) ([#17005](https://github.com/yt-dlp/yt-dlp/issues/17005)) by [Bnyro](https://github.com/Bnyro)
|
||||
|
||||
#### Downloader changes
|
||||
- **external**
|
||||
- [Fix resuming downloads with aria2c](https://github.com/yt-dlp/yt-dlp/commit/500e54cf860e4807d259bfe6a7abb47e51364a3b) ([#11698](https://github.com/yt-dlp/yt-dlp/issues/11698)) by [tcely](https://github.com/tcely)
|
||||
- `curl`: [Support development versions](https://github.com/yt-dlp/yt-dlp/commit/7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7) ([#16922](https://github.com/yt-dlp/yt-dlp/issues/16922)) by [syphyr](https://github.com/syphyr)
|
||||
- **mhtml**: [Fix storyboard content-length calculation](https://github.com/yt-dlp/yt-dlp/commit/8902f6ba8c7baba8fb43fb08ea1a9ddfef77e998) ([#13998](https://github.com/yt-dlp/yt-dlp/issues/13998)) by [Masterjun3](https://github.com/Masterjun3)
|
||||
|
||||
#### Misc. changes
|
||||
- **build**
|
||||
- [Update 17 dependencies](https://github.com/yt-dlp/yt-dlp/commit/8a5f1dd3bd39ad2e917755a29b313a51b5446871) ([#17014](https://github.com/yt-dlp/yt-dlp/issues/17014)) by [dlp-bot](https://github.com/dlp-bot)
|
||||
- [Update 6 dependencies](https://github.com/yt-dlp/yt-dlp/commit/40dd052c03c2d1b5c180f393d9344be2bd718ba3) ([#17086](https://github.com/yt-dlp/yt-dlp/issues/17086)) by [dlp-bot](https://github.com/dlp-bot)
|
||||
- **ci**
|
||||
- [Add label handler workflow](https://github.com/yt-dlp/yt-dlp/commit/1472d1098020d46ea1f15940b80d515ad13eb420) ([#17128](https://github.com/yt-dlp/yt-dlp/issues/17128)) by [bashonly](https://github.com/bashonly)
|
||||
- [Bump actions/checkout v6.0.3 => v7.0.0](https://github.com/yt-dlp/yt-dlp/commit/da99b21b2d6e32690d1871afc9e9779701dd7f8c) ([#17015](https://github.com/yt-dlp/yt-dlp/issues/17015)) by [dlp-bot](https://github.com/dlp-bot)
|
||||
- [Update 5 actions in 8 workflows](https://github.com/yt-dlp/yt-dlp/commit/84db5246faab5bffb8909de60c75e7c692b5dd79) ([#17024](https://github.com/yt-dlp/yt-dlp/issues/17024)) by [dlp-bot](https://github.com/dlp-bot)
|
||||
- **cleanup**
|
||||
- [Fix invalid info dict fields](https://github.com/yt-dlp/yt-dlp/commit/98036ccd4fd9a6b15e025bbc164e27286e342be7) ([#17007](https://github.com/yt-dlp/yt-dlp/issues/17007)) by [seproDev](https://github.com/seproDev)
|
||||
- [Fix minor mistakes](https://github.com/yt-dlp/yt-dlp/commit/b0472c3bce71eb08996a8d70c4c1b1df8cad4042) ([#17083](https://github.com/yt-dlp/yt-dlp/issues/17083)) by [doe1080](https://github.com/doe1080)
|
||||
- [Remove RTSP and MMS support](https://github.com/yt-dlp/yt-dlp/commit/bed3d58c5c1ff088584c5dac3c16eea4ff01c7b5) ([#17030](https://github.com/yt-dlp/yt-dlp/issues/17030)) by [seproDev](https://github.com/seproDev)
|
||||
- [Replace dead example/test URL](https://github.com/yt-dlp/yt-dlp/commit/c102b2096525218a6918a46b415fb167786f9656) ([#17061](https://github.com/yt-dlp/yt-dlp/issues/17061)) by [bashonly](https://github.com/bashonly)
|
||||
- Miscellaneous: [997fa14](https://github.com/yt-dlp/yt-dlp/commit/997fa140840a08df3938b40da470c78049fef1f6) by [bashonly](https://github.com/bashonly), [seproDev](https://github.com/seproDev)
|
||||
- **docs**: [Make "No AI / No LLM Policy" abundantly clear](https://github.com/yt-dlp/yt-dlp/commit/249aa5d6e667308fbf95ae5cfb40eba8177a802c) ([#16285](https://github.com/yt-dlp/yt-dlp/issues/16285)) by [bashonly](https://github.com/bashonly)
|
||||
|
||||
### 2026.06.09
|
||||
|
||||
#### Important changes
|
||||
|
||||
+7
-1
@@ -78,6 +78,13 @@ Core Maintainers are responsible for reviewing and merging contributions, publis
|
||||
* Improved/fixed/added ArdMediathek, DRTV, Floatplane, MagentaMusik, Naver, Nebula, OnDemandKorea, Vbox7 etc
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
Maintainers are stewards of the project's codebase who can review and merge pull requests.
|
||||
|
||||
- [doe1080](https://github.com/doe1080)
|
||||
|
||||
|
||||
## Triage Maintainers
|
||||
|
||||
Triage Maintainers are frequent contributors who can manage issues and pull requests.
|
||||
@@ -86,5 +93,4 @@ Triage Maintainers are frequent contributors who can manage issues and pull requ
|
||||
- [garret1317](https://github.com/garret1317)
|
||||
- [pzhlkj6612](https://github.com/pzhlkj6612)
|
||||
- [DTrombett](https://github.com/dtrombett)
|
||||
- [doe1080](https://github.com/doe1080)
|
||||
- [grqz](https://github.com/grqz)
|
||||
|
||||
@@ -142,11 +142,11 @@ While yt-dlp is licensed under the [Unlicense](LICENSE), many of the release fil
|
||||
|
||||
Most notably, the PyInstaller-bundled executables include GPLv3+ licensed code, and as such the combined work is licensed under [GPLv3+](https://www.gnu.org/licenses/gpl-3.0.html).
|
||||
|
||||
The zipimport Unix executable (`yt-dlp`) contains [ISC](https://github.com/meriyah/meriyah/blob/main/LICENSE.md) licensed code from [`meriyah`](https://github.com/meriyah/meriyah) and [MIT](https://github.com/davidbonnet/astring/blob/main/LICENSE) licensed code from [`astring`](https://github.com/davidbonnet/astring).
|
||||
The zipimport Unix executable (`yt-dlp`) and release tarball (`yt-dlp.tar.gz`) contain [ISC](https://github.com/meriyah/meriyah/blob/main/LICENSE.md) licensed code from [`meriyah`](https://github.com/meriyah/meriyah) and [MIT](https://github.com/davidbonnet/astring/blob/main/LICENSE) licensed code from [`astring`](https://github.com/davidbonnet/astring).
|
||||
|
||||
See [THIRD_PARTY_LICENSES.txt](THIRD_PARTY_LICENSES.txt) for more details.
|
||||
|
||||
The git repository, the source tarball (`yt-dlp.tar.gz`), the PyPI source distribution and the PyPI built distribution (wheel) only contain code licensed under the [Unlicense](LICENSE).
|
||||
The git repository, the PyPI source distribution and the PyPI built distribution (wheel) only contain code licensed under the [Unlicense](LICENSE).
|
||||
|
||||
<!-- MANPAGE: END EXCLUDED SECTION -->
|
||||
|
||||
@@ -245,7 +245,6 @@ The following provide support for impersonating browser requests. This may be re
|
||||
### Deprecated
|
||||
|
||||
* [**rtmpdump**](http://rtmpdump.mplayerhq.hu) - For downloading `rtmp` streams. ffmpeg can be used instead with `--downloader ffmpeg`. Licensed under [GPLv2+](http://rtmpdump.mplayerhq.hu)
|
||||
* [**mplayer**](http://mplayerhq.hu/design7/info.html) or [**mpv**](https://mpv.io) - For downloading `rstp`/`mms` streams. ffmpeg can be used instead with `--downloader ffmpeg`. Licensed under [GPLv2+](https://github.com/mpv-player/mpv/blob/master/Copyright)
|
||||
|
||||
To use or redistribute the dependencies, you must agree to their respective licensing terms.
|
||||
|
||||
@@ -625,16 +624,16 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywords
|
||||
"*10:15-inf" --download-sections "intro"
|
||||
--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, axel, curl, ffmpeg, httpie, wget.
|
||||
You can use this option multiple times to
|
||||
set different downloaders for different
|
||||
protocols. E.g. --downloader aria2c
|
||||
--downloader "dash,m3u8:native" will use
|
||||
aria2c for http/ftp downloads, and the
|
||||
native downloader for dash/m3u8 downloads
|
||||
(Alias: --external-downloader)
|
||||
(http, ftp, m3u8, dash, rtmp) to use it for.
|
||||
Currently supports native, aria2c, axel,
|
||||
curl, ffmpeg, httpie, wget. You can use this
|
||||
option multiple times to set different
|
||||
downloaders for different protocols. E.g.
|
||||
--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
|
||||
@@ -1587,7 +1586,7 @@ Also filtering work for comparisons `=` (equals), `^=` (starts with), `$=` (ends
|
||||
- `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`)
|
||||
- `protocol`: The protocol that will be used for the actual download, lower-case (`http`, `https`, `rtmp`, `rtmpe`, `f4m`, `ism`, `http_dash_segments`, `m3u8`, or `m3u8_native`)
|
||||
- `language`: Language code
|
||||
- `dynamic_range`: The dynamic range of the video
|
||||
- `format_id`: A short description of the format
|
||||
@@ -1615,7 +1614,7 @@ The available fields are:
|
||||
- `lang`: The language preference as determined by the extractor (e.g. original language preferred over audio description)
|
||||
- `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`)
|
||||
- `proto`: Protocol used for download (`https`/`ftps` > `http`/`ftp` > `m3u8_native`/`m3u8` > `http_dash_segments`> `websocket_frag` > `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` > `ac4` > `eac3` > `ac3` > `dts` > other)
|
||||
- `codec`: Equivalent to `vcodec,acodec`
|
||||
@@ -1860,7 +1859,7 @@ The following extractors use this feature:
|
||||
#### youtube
|
||||
* `lang`: Prefer translated metadata (`title`, `description` etc) of this language code (case-sensitive). By default, the video primary language metadata is preferred, with a fallback to `en` translated. See [youtube/_base.py](https://github.com/yt-dlp/yt-dlp/blob/415b4c9f955b1a0391204bd24a7132590e7b3bdb/yt_dlp/extractor/youtube/_base.py#L402-L409) for the list of supported content language codes
|
||||
* `skip`: One or more of `hls`, `dash` or `translated_subs` to skip extraction of the m3u8 manifests, dash manifests and [auto-translated subtitles](https://github.com/yt-dlp/yt-dlp/issues/4090#issuecomment-1158102032) respectively
|
||||
* `player_client`: Clients to extract video data from. The currently available clients are `web`, `web_safari`, `web_embedded`, `web_music`, `web_creator`, `mweb`, `ios`, `android`, `android_vr`, `tv`, `tv_downgraded`, and `tv_simply`. By default, `android_vr,web_safari` is used. If no JavaScript runtime/engine is available, then only `android_vr` is used. If logged-in cookies are passed to yt-dlp, then `tv_downgraded,web_safari` is used for free accounts and `tv_downgraded,web_creator` is used for premium accounts. The `web_music` client is added for `music.youtube.com` URLs when logged-in cookies are used. The `web_embedded` client is added for age-restricted videos but only successfully works around the age-restriction sometimes (e.g. if the video is embeddable), and may be added as a fallback if `android_vr` is unable to access a video. The `web_creator` client is added for age-restricted videos if account age-verification is required. Some clients, such as `web_creator` and `web_music`, require a `po_token` for their formats to be downloadable. Some clients, such as `web_creator`, will only work with authentication. Not all clients support authentication via cookies. You can use `default` for the default clients, or you can use `all` for all clients (not recommended). You can prefix a client with `-` to exclude it, e.g. `youtube:player_client=default,-web_safari`
|
||||
* `player_client`: Clients to extract video data from. The currently available clients are `web`, `web_safari`, `web_embedded`, `web_music`, `web_creator`, `mweb`, `ios`, `visionos`, `android`, `android_vr`, `tv`, `tv_downgraded`, and `tv_simply`. By default, `visionos,android_vr,web` is used. If no JavaScript runtime/engine is available, then `web` is omitted. If logged-in cookies are passed to yt-dlp, then `tv_downgraded,web` is used for free accounts and `tv_downgraded,web_creator,web` is used for premium accounts. The `web_music` client is added for `music.youtube.com` URLs when logged-in cookies are used. The `web_embedded` client is added for age-restricted videos but only successfully works around the age-restriction sometimes (e.g. if the video is embeddable). The `tv_downgraded` client may be added as a fallback if `android_vr` or `visionos` is unable to access a video. The `web_creator` client is added for age-restricted videos if account age-verification is required. Some clients, such as `web_creator` and `web_music`, require a `po_token` for their formats to be downloadable. Some clients, such as `web_creator`, will only work with authentication. Not all clients support authentication via cookies. You can use `default` for the default clients, or you can use `all` for all clients (not recommended). You can prefix a client with `-` to exclude it, e.g. `youtube:player_client=default,-web`
|
||||
* `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), `initial_data` (skip initial data/next ep request). While these options can help reduce the number of requests needed or avoid some rate-limiting, they could cause issues such as missing formats or metadata. See [#860](https://github.com/yt-dlp/yt-dlp/pull/860) and [#12826](https://github.com/yt-dlp/yt-dlp/issues/12826) for more details
|
||||
* `webpage_skip`: Skip extraction of embedded webpage data. One or both of `player_response`, `initial_data`. These options are for testing purposes and don't skip any network requests. Neither is skipped by default; however, if a `player_js_version` value other than `actual` is used, then `webpage_skip=player_response` is implied
|
||||
* `webpage_client`: Client to use for the video webpage request. One of `web` or `web_safari` (default)
|
||||
@@ -1871,7 +1870,7 @@ The following extractors use this feature:
|
||||
* `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,max-depth`. Default is `all,all,all,all,all`
|
||||
* A `max-depth` value of `1` will discard all replies, regardless of the `max-replies` or `max-replies-per-thread` values given
|
||||
* E.g. `all,all,1000,10,2` will get a maximum of 1000 replies total, with up to 10 replies per thread, and only 2 levels of depth (i.e. top-level comments plus their immediate replies). `1000,all,100` will get a maximum of 1000 comments, with a maximum of 100 replies total
|
||||
* `formats`: Change the types of formats to return. `dashy` (convert HTTP to DASH), `duplicate` (identical content but different URLs or protocol; includes `dashy`), `incomplete` (cannot be downloaded completely - live dash, live adaptive https, and post-live m3u8), `missing_pot` (include formats that require a PO Token but are missing one)
|
||||
* `formats`: Change the types of formats to return. `dashy` (convert HTTP to DASH), `duplicate` (identical content but different URLs or protocol; includes `dashy`), `incomplete` (cannot be downloaded completely - live and post-live dash, post-live m3u8, and live adaptive https without --live-from-start), `missing_pot` (include formats that require a PO Token but are missing one)
|
||||
* `innertube_host`: Innertube API host to use for all API requests; e.g. `studio.youtube.com`, `youtubei.googleapis.com`. Note that cookies exported from one subdomain will not work on others
|
||||
* `innertube_key`: Innertube API key to use for all API requests. By default, no API key is used
|
||||
* `raise_incomplete_data`: `Incomplete Data Received` raises an error instead of reporting a warning
|
||||
@@ -1976,7 +1975,7 @@ The following extractors use this feature:
|
||||
* `backend`: Backend API to use for extraction - one of `streaks` (default) or `brightcove` (deprecated)
|
||||
|
||||
#### vimeo
|
||||
* `client`: Client to extract video data from. The currently available clients are `android`, `ios`, `macos` and `web`. Only one client can be used. The `macos` client is used by default, but the `web` client is used when logged-in. The `web` client only works with account cookies or login credentials. The `android` and `ios` clients only work with previously cached OAuth tokens
|
||||
* `client`: Client to extract video data from. The currently available clients are `android`, `macos_basic`, and `web`. Only one client can be used. The `macos_basic` client is used by default, but the `web` client is used when logged-in. The `web` client only works with account cookies or login credentials. The `android` client only works with previously cached OAuth tokens
|
||||
* `original_format_policy`: Policy for when to try extracting original formats. One of `always`, `never`, or `auto`. The default `auto` policy tries to avoid exceeding the web client's API rate-limit by only making an extra request when Vimeo publicizes the video's downloadability
|
||||
|
||||
#### zan
|
||||
|
||||
+891
-528
File diff suppressed because it is too large
Load Diff
@@ -38,11 +38,16 @@ def main():
|
||||
f'--name={name}',
|
||||
'--icon=devscripts/logo.ico',
|
||||
'--upx-exclude=vcruntime140.dll',
|
||||
# setuptools and packaging are PyInstaller runtime dependencies,
|
||||
# but would be collected due to cffi's imports if we don't exclude
|
||||
'--exclude-module=setuptools',
|
||||
'--exclude-module=packaging',
|
||||
# Ref: https://github.com/yt-dlp/yt-dlp/issues/13311
|
||||
# https://github.com/pyinstaller/pyinstaller/issues/9149
|
||||
'--exclude-module=pkg_resources',
|
||||
'--noconfirm',
|
||||
'--additional-hooks-dir=yt_dlp/__pyinstaller',
|
||||
'--add-data=THIRD_PARTY_LICENSES.txt:.',
|
||||
*opts,
|
||||
'yt_dlp/__main__.py',
|
||||
]
|
||||
|
||||
@@ -367,5 +367,24 @@
|
||||
"action": "add",
|
||||
"when": "25056f0d2d47adbd235a8d422fa62d68d0be2bc2",
|
||||
"short": "[priority] Security: [[CVE-2026-50574](https://nvd.nist.gov/vuln/detail/CVE-2026-50574)] [Arbitrary code execution via manifest downloads with aria2c](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-vx4q-3cr2-7cg2)\n - Impact is limited to users of `--downloader aria2c`\n - Support for downloading HLS and DASH formats with aria2c has been removed. Users affected by this change should migrate to use `-N` for concurrent fragment downloads via the native downloader"
|
||||
},
|
||||
{
|
||||
"action": "add",
|
||||
"when": "7b03011294c0210802ffc901390006c39152b999",
|
||||
"short": "[priority] **The minimum *recommended* Python version has been raised to 3.11**\n - Since Python 3.10 will reach its end-of-life in October 2026, support for it will be dropped soon. [Read more](https://github.com/yt-dlp/yt-dlp/issues/16916)"
|
||||
},
|
||||
{
|
||||
"action": "add",
|
||||
"when": "7b03011294c0210802ffc901390006c39152b999",
|
||||
"short": "[priority] **The official Windows release binaries will soon require Windows 10 or later.** [Read more](https://github.com/yt-dlp/yt-dlp/issues/16917)"
|
||||
},
|
||||
{
|
||||
"action": "add",
|
||||
"when": "b6590aaa1e3808155d69c9a79a797ae484163789",
|
||||
"short": "[priority] Security: [[CVE-2026-55404](https://nvd.nist.gov/vuln/detail/CVE-2026-55404)] [Downstream command injection via improper sanitization of --write-link output](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-6v4j-43gg-vj32)\n - Shortcut file data is now properly validated and sanitized when the `--write-link` options are used"
|
||||
},
|
||||
{
|
||||
"action": "remove",
|
||||
"when": "a8be438aac1b90c3888e974056d967b8be90fa7e"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@ HEADER = '''THIRD-PARTY LICENSES
|
||||
This file aggregates license texts of third-party components included with the yt-dlp PyInstaller-bundled executables.
|
||||
yt-dlp itself is licensed under the Unlicense (see LICENSE file).
|
||||
Source code for bundled third-party components is available from the original projects.
|
||||
If you cannot obtain it, the maintainers will provide it as per license obligation; maintainer emails are listed in pyproject.toml.'''
|
||||
If you cannot obtain it, the maintainers will provide it as per license obligation: email maintainers@yt-dlp.org'''
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -47,6 +47,13 @@ DEPENDENCIES: list[Dependency] = [
|
||||
license_url='https://raw.githubusercontent.com/libffi/libffi/refs/heads/master/LICENSE',
|
||||
project_url='https://sourceware.org/libffi/',
|
||||
),
|
||||
Dependency(
|
||||
name='OpenSSL 1.x',
|
||||
license='OpenSSL',
|
||||
license_url='https://raw.githubusercontent.com/openssl/openssl/refs/tags/OpenSSL_1_1_1t/LICENSE',
|
||||
comment='Only included in `yt-dlp.exe` and `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://www.openssl.org/',
|
||||
),
|
||||
Dependency(
|
||||
name='OpenSSL 3.0+',
|
||||
license='Apache-2.0',
|
||||
@@ -123,43 +130,79 @@ DEPENDENCIES: list[Dependency] = [
|
||||
name='libintl',
|
||||
license='LGPL-2.1-or-later',
|
||||
license_url='https://raw.githubusercontent.com/autotools-mirror/gettext/refs/heads/master/gettext-runtime/intl/COPYING.LIB',
|
||||
comment='Only included in macOS builds',
|
||||
comment='Only included in Linux builds',
|
||||
project_url='https://www.gnu.org/software/gettext/',
|
||||
),
|
||||
Dependency(
|
||||
name='libidn2',
|
||||
license='LGPL-3.0-or-later',
|
||||
license_url='https://gitlab.com/libidn/libidn2/-/raw/master/COPYING.LESSERv3',
|
||||
comment='Only included in macOS builds',
|
||||
comment='Only included in Linux builds',
|
||||
project_url='https://www.gnu.org/software/libidn/',
|
||||
),
|
||||
Dependency(
|
||||
name='libidn2 (Unicode character data files)',
|
||||
license='Unicode-TOU AND Unicode-DFS-2016',
|
||||
license_url='https://gitlab.com/libidn/libidn2/-/raw/master/COPYING.unicode',
|
||||
comment='Only included in macOS builds',
|
||||
comment='Only included in Linux builds',
|
||||
project_url='https://www.gnu.org/software/libidn/',
|
||||
),
|
||||
Dependency(
|
||||
name='libunistring',
|
||||
license='LGPL-3.0-or-later',
|
||||
license_url='https://gitweb.git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob_plain;f=COPYING.LIB;hb=HEAD',
|
||||
comment='Only included in macOS builds',
|
||||
comment='Only included in Linux builds',
|
||||
project_url='https://www.gnu.org/software/libunistring/',
|
||||
),
|
||||
|
||||
# Non-Python dependencies of curl_cffi
|
||||
Dependency(
|
||||
name='librtmp',
|
||||
license='LGPL-2.1-or-later',
|
||||
# No official repo URL
|
||||
license_url='https://gist.githubusercontent.com/seproDev/31d8c691ccddebe37b8b379307cb232d/raw/053408e98547ea8c7d9ba3a80c965f33e163b881/librtmp_COPYING.txt',
|
||||
comment='Only included in macOS builds',
|
||||
project_url='https://rtmpdump.mplayerhq.hu/',
|
||||
name='curl-impersonate',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/lexiforest/curl-impersonate/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://github.com/lexiforest/curl-impersonate',
|
||||
),
|
||||
Dependency(
|
||||
name='curl',
|
||||
license='curl',
|
||||
license_url='https://raw.githubusercontent.com/curl/curl/refs/heads/master/LICENSES/curl.txt',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://curl.se/',
|
||||
),
|
||||
Dependency(
|
||||
name='BoringSSL',
|
||||
license='Apache-2.0',
|
||||
license_url='https://raw.githubusercontent.com/google/boringssl/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://boringssl.googlesource.com/boringssl',
|
||||
),
|
||||
Dependency(
|
||||
name='nghttp2',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/nghttp2/nghttp2/refs/heads/master/COPYING',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://nghttp2.org/',
|
||||
),
|
||||
Dependency(
|
||||
name='ngtcp2',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/ngtcp2/ngtcp2/refs/heads/main/COPYING',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://nghttp2.org/ngtcp2/',
|
||||
),
|
||||
Dependency(
|
||||
name='nghttp3',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/ngtcp2/nghttp3/refs/heads/main/COPYING',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://nghttp2.org/nghttp3/',
|
||||
),
|
||||
Dependency(
|
||||
name='zstd',
|
||||
license='BSD-3-Clause',
|
||||
license_url='https://raw.githubusercontent.com/facebook/zstd/refs/heads/dev/LICENSE',
|
||||
comment='Only included in macOS builds',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://facebook.github.io/zstd/',
|
||||
),
|
||||
|
||||
@@ -174,28 +217,74 @@ DEPENDENCIES: list[Dependency] = [
|
||||
name='curl_cffi',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/lexiforest/curl_cffi/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86` and `yt-dlp_musllinux_aarch64` builds',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://curl-cffi.readthedocs.io/',
|
||||
),
|
||||
# curl_cffi vendored code:
|
||||
# - https://github.com/lexiforest/curl_cffi/blob/v0.15.0/curl_cffi/_asyncio_selector.py
|
||||
Dependency(
|
||||
name='Tornado',
|
||||
license='Apache-2.0',
|
||||
license_url='https://raw.githubusercontent.com/tornadoweb/tornado/master/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='http://www.tornadoweb.org/',
|
||||
),
|
||||
# curl_cffi vendored code:
|
||||
# - https://github.com/lexiforest/curl_cffi/blob/v0.15.0/curl_cffi/requests/cookies.py
|
||||
# - https://github.com/lexiforest/curl_cffi/blob/v0.15.0/curl_cffi/requests/headers.py
|
||||
Dependency(
|
||||
name='httpx',
|
||||
license='BSD-3-Clause',
|
||||
license_url='https://github.com/encode/httpx/raw/master/LICENSE.md',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://www.python-httpx.org/',
|
||||
),
|
||||
# Dependency of curl_cffi
|
||||
Dependency(
|
||||
name='curl-impersonate',
|
||||
name='rich',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/lexiforest/curl-impersonate/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86` and `yt-dlp_musllinux_aarch64` builds',
|
||||
project_url='https://github.com/lexiforest/curl-impersonate',
|
||||
license_url='https://raw.githubusercontent.com/Textualize/rich/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://rich.readthedocs.io/',
|
||||
),
|
||||
# Dependency of rich
|
||||
Dependency(
|
||||
name='pygments',
|
||||
license='BSD-2-Clause',
|
||||
license_url='https://raw.githubusercontent.com/pygments/pygments/refs/heads/master/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='http://pygments.org/',
|
||||
),
|
||||
# Dependency of rich
|
||||
Dependency(
|
||||
name='markdown-it-py',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/executablebooks/markdown-it-py/refs/heads/master/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://markdown-it-py.readthedocs.io/',
|
||||
),
|
||||
# Dependency of markdown-it-py
|
||||
Dependency(
|
||||
name='mdurl',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/executablebooks/mdurl/refs/heads/master/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://github.com/executablebooks/mdurl',
|
||||
),
|
||||
# Dependency of cryptography and curl_cffi
|
||||
Dependency(
|
||||
name='cffi',
|
||||
license='MIT-0', # Technically does not need to be included
|
||||
license_url='https://raw.githubusercontent.com/python-cffi/cffi/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://cffi.readthedocs.io/',
|
||||
),
|
||||
# Dependecy of cffi
|
||||
# Dependency of cffi
|
||||
Dependency(
|
||||
name='pycparser',
|
||||
license='BSD-3-Clause',
|
||||
license_url='https://raw.githubusercontent.com/eliben/pycparser/refs/heads/main/LICENSE',
|
||||
comment='Not included in `yt-dlp_x86.exe` Windows builds',
|
||||
project_url='https://github.com/eliben/pycparser',
|
||||
),
|
||||
Dependency(
|
||||
@@ -276,12 +365,14 @@ DEPENDENCIES: list[Dependency] = [
|
||||
name='Meriyah',
|
||||
license='ISC',
|
||||
license_url='https://raw.githubusercontent.com/meriyah/meriyah/refs/heads/main/LICENSE.md',
|
||||
comment='Also included in `yt-dlp` zipimport Unix executables and `yt-dlp.tar.gz` release tarballs',
|
||||
project_url='https://github.com/meriyah/meriyah',
|
||||
),
|
||||
Dependency(
|
||||
name='Astring',
|
||||
license='MIT',
|
||||
license_url='https://raw.githubusercontent.com/davidbonnet/astring/refs/heads/main/LICENSE',
|
||||
comment='Also included in `yt-dlp` zipimport Unix executables and `yt-dlp.tar.gz` release tarballs',
|
||||
project_url='https://github.com/davidbonnet/astring/',
|
||||
),
|
||||
]
|
||||
|
||||
+32
-28
@@ -42,7 +42,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **AcFunVideo**
|
||||
- **ADN**: [*animationdigitalnetwork*](## "netrc machine") Animation Digital Network
|
||||
- **ADNSeason**: [*animationdigitalnetwork*](## "netrc machine") Animation Digital Network
|
||||
- **AdobeConnect**
|
||||
- **AdobeConnect**: (**Currently broken**)
|
||||
- **adobetv**
|
||||
- **AdultSwim**
|
||||
- **aenetworks**: A+E Networks: A&E, Lifetime, History.com, FYI Network and History Vault
|
||||
@@ -326,7 +326,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **DeuxMNews**
|
||||
- **DHM**: Filmarchiv - Deutsches Historisches Museum (**Currently broken**)
|
||||
- **DigitalConcertHall**: [*digitalconcerthall*](## "netrc machine") DigitalConcertHall extractor
|
||||
- **DigitallySpeaking**
|
||||
- **DigitallySpeaking**: (**Currently broken**)
|
||||
- **Digiteka**
|
||||
- **Digiview**
|
||||
- **DiscogsReleasePlaylist**
|
||||
@@ -430,7 +430,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Flickr**
|
||||
- **Floatplane**
|
||||
- **FloatplaneChannel**
|
||||
- **Folketinget**: Folketinget (ft.dk; Danish parliament)
|
||||
- **Folketinget**: Folketinget (ft.dk; Danish parliament) (**Currently broken**)
|
||||
- **FoodNetwork**
|
||||
- **FootyRoom**
|
||||
- **Formula1**
|
||||
@@ -504,7 +504,6 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **GoDiscovery**
|
||||
- **GodResource**
|
||||
- **GodTube**: (**Currently broken**)
|
||||
- **Gofile**
|
||||
- **Golem**
|
||||
- **goodgame:stream**
|
||||
- **GoogleDrive**
|
||||
@@ -620,7 +619,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Kakao**
|
||||
- **Kaltura**
|
||||
- **KankaNews**: (**Currently broken**)
|
||||
- **Karaoketv**
|
||||
- **Karaoketv**: (**Currently broken**)
|
||||
- **Katsomo**: (**Currently broken**)
|
||||
- **KelbyOne**: (**Currently broken**)
|
||||
- **Kenh14Playlist**
|
||||
@@ -679,10 +678,10 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **life:embed**
|
||||
- **likee**
|
||||
- **likee:user**
|
||||
- **LinkedIn**: [*linkedin*](## "netrc machine")
|
||||
- **linkedin:events**: [*linkedin*](## "netrc machine")
|
||||
- **linkedin:learning**: [*linkedin*](## "netrc machine")
|
||||
- **linkedin:learning:course**: [*linkedin*](## "netrc machine")
|
||||
- **LinkedIn**
|
||||
- **linkedin:events**
|
||||
- **linkedin:learning**
|
||||
- **linkedin:learning:course**
|
||||
- **Liputan6**
|
||||
- **ListenNotes**
|
||||
- **LiTV**
|
||||
@@ -743,6 +742,12 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **megatvcom**: megatv.com videos
|
||||
- **megatvcom:embed**: megatv.com embedded videos
|
||||
- **Meipai**: 美拍
|
||||
- **mellowfan**: [*mellowfan*](## "netrc machine") mellow-fan
|
||||
- **mellowfan:capture**: [*mellowfan*](## "netrc machine")
|
||||
- **mellowfan:channel**: [*mellowfan*](## "netrc machine")
|
||||
- **mellowfan:channel:search**: [*mellowfan*](## "netrc machine")
|
||||
- **mellowfan:movie**: [*mellowfan*](## "netrc machine")
|
||||
- **mellowfan:playlist**: [*mellowfan*](## "netrc machine")
|
||||
- **MelonVOD**
|
||||
- **Metacritic**
|
||||
- **mewatch**
|
||||
@@ -797,8 +802,9 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Mx3**
|
||||
- **Mx3Neo**
|
||||
- **Mx3Volksmusik**
|
||||
- **Mxplayer**
|
||||
- **MxplayerShow**
|
||||
- **mxplayer**: Amazon MX Player
|
||||
- **mxplayer:season**
|
||||
- **mxplayer:show**
|
||||
- **MySpace**
|
||||
- **MySpace:album**
|
||||
- **MySpass**
|
||||
@@ -939,8 +945,11 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Odnoklassniki**
|
||||
- **OfTV**
|
||||
- **OfTVPlaylist**
|
||||
- **OktoberfestTV**
|
||||
- **OktoberfestTV**: (**Currently broken**)
|
||||
- **OlympicsReplay**
|
||||
- **Omnyfm**
|
||||
- **OmnyfmPlaylist**
|
||||
- **OmnyfmShow**
|
||||
- **on24**: ON24
|
||||
- **OnDemandChinaEpisode**
|
||||
- **OnDemandKorea**
|
||||
@@ -954,9 +963,6 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **onsen**: [*onsen*](## "netrc machine") インターネットラジオステーション<音泉>
|
||||
- **Opencast**
|
||||
- **OpencastPlaylist**
|
||||
- **openrec**
|
||||
- **openrec:capture**
|
||||
- **openrec:movie**
|
||||
- **orf:fm4:story**: fm4.orf.at stories
|
||||
- **orf:iptv**: iptv.ORF.at
|
||||
- **orf:on**
|
||||
@@ -1014,7 +1020,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **player.sky.it**
|
||||
- **PlayerFm**
|
||||
- **PlaySuisse**: [*playsuisse*](## "netrc machine")
|
||||
- **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz
|
||||
- **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz (**Currently broken**)
|
||||
- **PlayVids**
|
||||
- **pluralsight**: [*pluralsight*](## "netrc machine")
|
||||
- **pluralsight:course**
|
||||
@@ -1121,7 +1127,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **RedBullEmbed**
|
||||
- **RedBullTV**
|
||||
- **RedBullTVRrnContent**
|
||||
- **Reddit**: [*reddit*](## "netrc machine")
|
||||
- **Reddit**
|
||||
- **RedGifs**
|
||||
- **RedGifsSearch**: Redgifs search
|
||||
- **RedGifsUser**: Redgifs user
|
||||
@@ -1153,7 +1159,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **rtl.lu:article**
|
||||
- **rtl.lu:tele-vod**
|
||||
- **rtl.nl**: rtl.nl and rtlxl.nl
|
||||
- **rtl2**
|
||||
- **rtl2**: (**Currently broken**)
|
||||
- **RTLLuLive**
|
||||
- **RTLLuRadio**
|
||||
- **RTNews**
|
||||
@@ -1231,7 +1237,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **SharePoint**
|
||||
- **ShemarooMe**
|
||||
- **Shiey**
|
||||
- **ShowRoomLive**
|
||||
- **ShowRoomLive**: (**Currently broken**)
|
||||
- **ShugiinItvLive**: 衆議院インターネット審議中継
|
||||
- **ShugiinItvLiveRoom**: 衆議院インターネット審議中継 (中継)
|
||||
- **ShugiinItvVod**: 衆議院インターネット審議中継 (ビデオライブラリ)
|
||||
@@ -1369,7 +1375,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **TeleQuebecSquat**
|
||||
- **TeleQuebecVideo**
|
||||
- **TeleTask**: (**Currently broken**)
|
||||
- **Telewebion**: (**Currently broken**)
|
||||
- **Telewebion**
|
||||
- **TennisTV**: [*tennistv*](## "netrc machine")
|
||||
- **TF1**
|
||||
- **TFO**: (**Currently broken**)
|
||||
@@ -1414,10 +1420,6 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Toypics**: Toypics video (**Currently broken**)
|
||||
- **ToypicsUser**: Toypics user profile (**Currently broken**)
|
||||
- **TravelChannel**
|
||||
- **Trovo**
|
||||
- **TrovoChannelClip**: All Clips of a trovo.live channel; "trovoclip:" prefix
|
||||
- **TrovoChannelVod**: All VODs of a trovo.live channel; "trovovod:" prefix
|
||||
- **TrovoVod**
|
||||
- **TrtCocukVideo**
|
||||
- **TrtWorld**
|
||||
- **TrueID**
|
||||
@@ -1591,7 +1593,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **VTXTV**: [*vtxtv*](## "netrc machine")
|
||||
- **VTXTVLive**: [*vtxtv*](## "netrc machine")
|
||||
- **VTXTVRecordings**: [*vtxtv*](## "netrc machine")
|
||||
- **Walla**
|
||||
- **Walla**: (**Currently broken**)
|
||||
- **WalyTV**: [*walytv*](## "netrc machine")
|
||||
- **WalyTVLive**: [*walytv*](## "netrc machine")
|
||||
- **WalyTVRecordings**: [*walytv*](## "netrc machine")
|
||||
@@ -1621,7 +1623,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **WeverseMediaTab**: [*weverse*](## "netrc machine")
|
||||
- **WeverseMoment**: [*weverse*](## "netrc machine")
|
||||
- **WeVidi**
|
||||
- **whowatch**
|
||||
- **whowatch**: (**Currently broken**)
|
||||
- **Whyp**
|
||||
- **wikimedia.org**
|
||||
- **Wimbledon**
|
||||
@@ -1636,8 +1638,8 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **WorldStarHipHop**
|
||||
- **wppilot**
|
||||
- **wppilot:channels**
|
||||
- **WrestleUniversePPV**: [*wrestleuniverse*](## "netrc machine")
|
||||
- **WrestleUniverseVOD**: [*wrestleuniverse*](## "netrc machine")
|
||||
- **wrestleuniverse:ppv**: [*wrestleuniverse*](## "netrc machine")
|
||||
- **wrestleuniverse:vod**: [*wrestleuniverse*](## "netrc machine")
|
||||
- **WSJ**: Wall Street Journal
|
||||
- **WSJArticle**
|
||||
- **WWE**
|
||||
@@ -1708,6 +1710,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **YoutubeYtBe**: [*youtube*](## "netrc machine") youtu.be
|
||||
- **Zaiko**
|
||||
- **ZaikoETicket**
|
||||
- **zan**: Z-aN
|
||||
- **Zapiks**
|
||||
- **Zattoo**: [*zattoo*](## "netrc machine")
|
||||
- **ZattooLive**: [*zattoo*](## "netrc machine")
|
||||
@@ -1730,5 +1733,6 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **zingmp3:user**
|
||||
- **zingmp3:week-chart**
|
||||
- **zoom**
|
||||
- **zoom:clips**
|
||||
- **Zype**
|
||||
- **generic**: Generic downloader that works on some sites
|
||||
|
||||
+25
-3
@@ -134,7 +134,10 @@ from yt_dlp.utils import (
|
||||
xpath_text,
|
||||
xpath_with_ns,
|
||||
)
|
||||
from yt_dlp.utils._utils import _UnsafeExtensionError
|
||||
from yt_dlp.utils._utils import (
|
||||
_UnsafeExtensionError,
|
||||
_desktop_entry_localestring,
|
||||
)
|
||||
from yt_dlp.utils.networking import (
|
||||
HTTPHeaderDict,
|
||||
escape_rfc3986,
|
||||
@@ -689,8 +692,6 @@ class TestUtil(unittest.TestCase):
|
||||
self.assertEqual(url_or_none('//foo.de'), '//foo.de')
|
||||
self.assertEqual(url_or_none('s3://foo.de'), None)
|
||||
self.assertEqual(url_or_none('rtmpte://foo.de'), 'rtmpte://foo.de')
|
||||
self.assertEqual(url_or_none('mms://foo.de'), 'mms://foo.de')
|
||||
self.assertEqual(url_or_none('rtspu://foo.de'), 'rtspu://foo.de')
|
||||
self.assertEqual(url_or_none('ftps://foo.de'), 'ftps://foo.de')
|
||||
self.assertEqual(url_or_none('ws://foo.de'), 'ws://foo.de')
|
||||
self.assertEqual(url_or_none('wss://foo.de'), 'wss://foo.de')
|
||||
@@ -1950,6 +1951,27 @@ Line 1
|
||||
self.assertEqual(
|
||||
iri_to_uri('http://导航.中国/'),
|
||||
'http://xn--fet810g.xn--fiqs8s/')
|
||||
self.assertEqual(
|
||||
iri_to_uri('file://example.org/run.exe', allowed_schemes=('file',)),
|
||||
'file://example.org/run.exe')
|
||||
self.assertRaises(ValueError, iri_to_uri, 'file://example.org/run.exe')
|
||||
|
||||
def test_desktop_entry_localestring(self):
|
||||
self.assertEqual(
|
||||
_desktop_entry_localestring('A B'),
|
||||
'A\\sB')
|
||||
self.assertEqual(
|
||||
_desktop_entry_localestring('A\nB'),
|
||||
'A\\nB')
|
||||
self.assertEqual(
|
||||
_desktop_entry_localestring('A\tB'),
|
||||
'A\\tB')
|
||||
self.assertEqual(
|
||||
_desktop_entry_localestring('A\rB'),
|
||||
'A\\rB')
|
||||
self.assertEqual(
|
||||
_desktop_entry_localestring('A\\B'),
|
||||
'A\\\\B')
|
||||
|
||||
def test_clean_podcast_url(self):
|
||||
self.assertEqual(clean_podcast_url('https://www.podtrac.com/pts/redirect.mp3/chtbl.com/track/5899E/traffic.megaphone.fm/HSW7835899191.mp3'), 'https://traffic.megaphone.fm/HSW7835899191.mp3')
|
||||
|
||||
+14
-5
@@ -170,7 +170,12 @@ from .utils import (
|
||||
write_json_file,
|
||||
write_string,
|
||||
)
|
||||
from .utils._utils import _UnsafeExtensionError, _YDLLogger, _ProgressState
|
||||
from .utils._utils import (
|
||||
_UnsafeExtensionError,
|
||||
_YDLLogger,
|
||||
_ProgressState,
|
||||
_desktop_entry_localestring,
|
||||
)
|
||||
from .utils.networking import (
|
||||
HTTPHeaderDict,
|
||||
clean_headers,
|
||||
@@ -480,7 +485,7 @@ class YoutubeDL:
|
||||
geo_bypass_country
|
||||
external_downloader: A dictionary of protocol keys and the executable of the
|
||||
external downloader to use for it. The allowed protocols
|
||||
are default|http|ftp|m3u8|dash|rtsp|rtmp|mms.
|
||||
are default|http|ftp|m3u8|dash|rtmp.
|
||||
Set the value to 'native' to use the native downloader
|
||||
compat_opts: Compatibility options. See "Differences in default behavior".
|
||||
The following options do not work when used through the API:
|
||||
@@ -1140,7 +1145,7 @@ class YoutubeDL:
|
||||
self.params['logger'].warning(message)
|
||||
elif self.params.get('no_warnings'):
|
||||
if self.params.get('verbose'):
|
||||
self.to_stderr(f'[debug:warning] {message}', only_once=only_once)
|
||||
self.to_stderr(f'[debug] WARNING: {message}', only_once=only_once)
|
||||
else:
|
||||
self.to_stderr(f'{self._format_err("WARNING:", self.Styles.WARNING)} {message}', only_once)
|
||||
|
||||
@@ -3406,10 +3411,13 @@ class YoutubeDL:
|
||||
|
||||
# Write internet shortcut files
|
||||
def _write_link_file(link_type):
|
||||
# iri_to_uri converts to ascii, percent-escapes unsafe characters & validates scheme
|
||||
# See https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-6v4j-43gg-vj32
|
||||
url = try_get(info_dict['webpage_url'], iri_to_uri)
|
||||
if not url:
|
||||
self.report_warning(
|
||||
f'Cannot write internet shortcut file because the actual URL of "{info_dict["webpage_url"]}" is unknown')
|
||||
f'Cannot write internet shortcut file because the actual URL '
|
||||
f'of "{info_dict["webpage_url"]}" is unknown or disallowed')
|
||||
return True
|
||||
linkfn = replace_extension(
|
||||
self.prepare_filename(info_dict, 'link'), link_type,
|
||||
@@ -3425,7 +3433,8 @@ class YoutubeDL:
|
||||
newline='\r\n' if link_type == 'url' else '\n') as linkfile:
|
||||
template_vars = {'url': url}
|
||||
if link_type == 'desktop':
|
||||
template_vars['filename'] = linkfn[:-(len(link_type) + 1)]
|
||||
# See https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-6v4j-43gg-vj32
|
||||
template_vars['filename'] = _desktop_entry_localestring(linkfn[:-(len(link_type) + 1)])
|
||||
linkfile.write(LINK_TEMPLATES[link_type] % template_vars)
|
||||
except OSError:
|
||||
self.report_error(f'Cannot write internet shortcut {linkfn}')
|
||||
|
||||
+1
-1
@@ -296,7 +296,7 @@ def validate_options(opts):
|
||||
default_step = start if op or limit else 0
|
||||
return lambda n: min(float(start) + float(step or default_step) * n, float(limit or 'inf'))
|
||||
|
||||
for key, expr in opts.retry_sleep.items():
|
||||
for key, expr in list(opts.retry_sleep.items()):
|
||||
if not expr:
|
||||
del opts.retry_sleep[key]
|
||||
continue
|
||||
|
||||
@@ -32,7 +32,6 @@ from .ism import IsmFD
|
||||
from .mhtml import MhtmlFD
|
||||
from .niconico import NiconicoLiveFD
|
||||
from .rtmp import RtmpFD
|
||||
from .rtsp import RtspFD
|
||||
from .websocket import WebSocketFragmentFD
|
||||
from .youtube_live_chat import YoutubeLiveChatFD
|
||||
from .bunnycdn import BunnyCdnFD
|
||||
@@ -44,8 +43,6 @@ PROTOCOL_MAP = {
|
||||
'rtmp_ffmpeg': FFmpegFD,
|
||||
'm3u8_native': HlsFD,
|
||||
'm3u8': FFmpegFD,
|
||||
'mms': RtspFD,
|
||||
'rtsp': RtspFD,
|
||||
'f4m': F4mFD,
|
||||
'http_dash_segments': DashSegmentsFD,
|
||||
'http_dash_segments_generator': DashSegmentsFD,
|
||||
|
||||
@@ -375,7 +375,7 @@ class HttpieFD(ExternalFD):
|
||||
|
||||
|
||||
class FFmpegFD(ExternalFD):
|
||||
SUPPORTED_PROTOCOLS = ('http', 'https', 'ftp', 'ftps', 'm3u8', 'm3u8_native', 'rtsp', 'rtmp', 'rtmp_ffmpeg', 'mms', 'http_dash_segments')
|
||||
SUPPORTED_PROTOCOLS = ('http', 'https', 'ftp', 'ftps', 'm3u8', 'm3u8_native', 'rtmp', 'rtmp_ffmpeg', 'http_dash_segments')
|
||||
SUPPORTED_FEATURES = (Features.TO_STDOUT, Features.MULTIPLE_FORMATS)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -300,7 +300,7 @@ class HlsFD(FragmentFD):
|
||||
|
||||
# We only download the first fragment during the test
|
||||
if self.params.get('test', False):
|
||||
fragments = [fragments[0] if fragments else None]
|
||||
fragments = fragments[:1]
|
||||
|
||||
if real_downloader:
|
||||
info_dict['fragments'] = fragments
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from .common import FileDownloader
|
||||
from ..utils import check_executable
|
||||
|
||||
|
||||
class RtspFD(FileDownloader):
|
||||
def real_download(self, filename, info_dict):
|
||||
url = info_dict['url']
|
||||
self.report_destination(filename)
|
||||
tmpfilename = self.temp_name(filename)
|
||||
|
||||
if check_executable('mplayer', ['-h']):
|
||||
args = [
|
||||
'mplayer', '-really-quiet', '-vo', 'null', '-vc', 'dummy',
|
||||
'-dumpstream', '-dumpfile', tmpfilename, url]
|
||||
elif check_executable('mpv', ['-h']):
|
||||
args = [
|
||||
'mpv', '-really-quiet', '--vo=null', '--stream-dump=' + tmpfilename, url]
|
||||
else:
|
||||
self.report_error('MMS or RTSP download detected but neither "mplayer" nor "mpv" could be run. Please install one')
|
||||
return False
|
||||
|
||||
self._debug_cmd(args)
|
||||
|
||||
retval = subprocess.call(args)
|
||||
if retval == 0:
|
||||
fsize = os.path.getsize(tmpfilename)
|
||||
self.to_screen(f'\r[{args[0]}] {fsize} bytes')
|
||||
self.try_rename(tmpfilename, filename)
|
||||
self._hook_progress({
|
||||
'downloaded_bytes': fsize,
|
||||
'total_bytes': fsize,
|
||||
'filename': filename,
|
||||
'status': 'finished',
|
||||
}, info_dict)
|
||||
return True
|
||||
else:
|
||||
self.to_stderr('\n')
|
||||
self.report_error('%s exited with code %d' % (args[0], retval))
|
||||
return False
|
||||
@@ -106,7 +106,6 @@ from .archiveorg import (
|
||||
)
|
||||
from .arcpublishing import ArcPublishingIE
|
||||
from .ard import (
|
||||
ARDIE,
|
||||
ARDAudiothekIE,
|
||||
ARDAudiothekPlaylistIE,
|
||||
ARDBetaMediathekIE,
|
||||
@@ -359,7 +358,6 @@ from .commonmistakes import (
|
||||
UnicodeBOMIE,
|
||||
)
|
||||
from .commonprotocols import (
|
||||
MmsIE,
|
||||
RtmpIE,
|
||||
ViewSourceIE,
|
||||
)
|
||||
@@ -1720,7 +1718,10 @@ from .shahid import (
|
||||
from .sharepoint import SharePointIE
|
||||
from .shemaroome import ShemarooMeIE
|
||||
from .shiey import ShieyIE
|
||||
from .showroomlive import ShowRoomLiveIE
|
||||
from .showroomlive import (
|
||||
ShowRoomLiveIE,
|
||||
ShowRoomVodIE,
|
||||
)
|
||||
from .sibnet import SibnetEmbedIE
|
||||
from .simplecast import (
|
||||
SimplecastEpisodeIE,
|
||||
|
||||
@@ -4,6 +4,7 @@ from .common import InfoExtractor
|
||||
|
||||
|
||||
class AdobeConnectIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
_VALID_URL = r'https?://\w+\.adobeconnect\.com/(?P<id>[\w-]+)'
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import json
|
||||
import itertools
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..networking.exceptions import HTTPError
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
clean_html,
|
||||
int_or_none,
|
||||
try_get,
|
||||
unified_strdate,
|
||||
unified_timestamp,
|
||||
urljoin,
|
||||
)
|
||||
|
||||
|
||||
@@ -17,7 +21,7 @@ class AmericasTestKitchenIE(InfoExtractor):
|
||||
'md5': 'b861c3e365ac38ad319cfd509c30577f',
|
||||
'info_dict': {
|
||||
'id': '5b400b9ee338f922cb06450c',
|
||||
'title': 'Japanese Suppers',
|
||||
'title': 'Weeknight Japanese Suppers',
|
||||
'ext': 'mp4',
|
||||
'display_id': 'weeknight-japanese-suppers',
|
||||
'description': 'md5:64e606bfee910627efc4b5f050de92b3',
|
||||
@@ -106,23 +110,44 @@ class AmericasTestKitchenIE(InfoExtractor):
|
||||
|
||||
|
||||
class AmericasTestKitchenSeasonIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?(?P<show>americastestkitchen|(?P<cooks>cooks(?:country|illustrated)))\.com(?:(?:/(?P<show2>cooks(?:country|illustrated)))?(?:/?$|(?<!ated)(?<!ated\.com)/episodes/browse/season_(?P<season>\d+)))'
|
||||
_VALID_URL = r'''(?x)
|
||||
https?://(?:www\.)?(?P<domain>americastestkitchen|cookscountry|cooksillustrated)\.com
|
||||
(?:/(?P<path>cookscountry|cooksillustrated))?
|
||||
(?:/episodes(?:/browse)?/season[-_](?P<season>\d+))?
|
||||
/?(?:[?#]|$)'''
|
||||
_SHOWS = {
|
||||
'americastestkitchen': ('', 'America\'s Test Kitchen'),
|
||||
'cookscountry': ('/cookscountry', 'Cook\'s Country'),
|
||||
'cooksillustrated': ('/cooksillustrated', 'Cook\'s Illustrated'),
|
||||
}
|
||||
_TESTS = [{
|
||||
# ATK Season
|
||||
'url': 'https://www.americastestkitchen.com/episodes/browse/season_1',
|
||||
'url': 'https://www.americastestkitchen.com/episodes/season-1',
|
||||
'info_dict': {
|
||||
'id': 'season_1',
|
||||
'title': 'Season 1',
|
||||
},
|
||||
'playlist_count': 13,
|
||||
'playlist_mincount': 13,
|
||||
}, {
|
||||
# Latest ATK Season (new URL scheme)
|
||||
'url': 'https://www.americastestkitchen.com/episodes/season-26',
|
||||
'info_dict': {
|
||||
'id': 'season_26',
|
||||
'title': 'Season 26',
|
||||
},
|
||||
'playlist_count': 26,
|
||||
}, {
|
||||
# Cooks Country Season
|
||||
'url': 'https://www.americastestkitchen.com/cookscountry/episodes/browse/season_12',
|
||||
'url': 'https://www.americastestkitchen.com/cookscountry/episodes/season-12',
|
||||
'info_dict': {
|
||||
'id': 'season_12',
|
||||
'title': 'Season 12',
|
||||
},
|
||||
'playlist_count': 13,
|
||||
'playlist_mincount': 13,
|
||||
}, {
|
||||
# Old-style URL (redirects to the new season page)
|
||||
'url': 'https://www.americastestkitchen.com/episodes/browse/season_1',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
# America's Test Kitchen Series
|
||||
'url': 'https://www.americastestkitchen.com/',
|
||||
@@ -130,7 +155,7 @@ class AmericasTestKitchenSeasonIE(InfoExtractor):
|
||||
'id': 'americastestkitchen',
|
||||
'title': 'America\'s Test Kitchen',
|
||||
},
|
||||
'playlist_count': 558,
|
||||
'playlist_mincount': 558,
|
||||
}, {
|
||||
# Cooks Country Series
|
||||
'url': 'https://www.americastestkitchen.com/cookscountry',
|
||||
@@ -138,7 +163,7 @@ class AmericasTestKitchenSeasonIE(InfoExtractor):
|
||||
'id': 'cookscountry',
|
||||
'title': 'Cook\'s Country',
|
||||
},
|
||||
'playlist_count': 199,
|
||||
'playlist_mincount': 199,
|
||||
}, {
|
||||
'url': 'https://www.americastestkitchen.com/cookscountry/',
|
||||
'only_matching': True,
|
||||
@@ -157,59 +182,46 @@ class AmericasTestKitchenSeasonIE(InfoExtractor):
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
season_number, show1, show = self._match_valid_url(url).group('season', 'show', 'show2')
|
||||
show_path = ('/' + show) if show else ''
|
||||
show = show or show1
|
||||
season_number = int_or_none(season_number)
|
||||
domain, url_path, season = self._match_valid_url(url).group('domain', 'path', 'season')
|
||||
show_path, title = self._SHOWS[url_path or domain]
|
||||
season = int_or_none(season)
|
||||
|
||||
slug, title = {
|
||||
'americastestkitchen': ('atk', 'America\'s Test Kitchen'),
|
||||
'cookscountry': ('cco', 'Cook\'s Country'),
|
||||
'cooksillustrated': ('cio', 'Cook\'s Illustrated'),
|
||||
}[show]
|
||||
if season:
|
||||
playlist_id = f'season_{season}'
|
||||
playlist_title = f'Season {season}'
|
||||
|
||||
facet_filters = [
|
||||
'search_document_klass:episode',
|
||||
'search_show_slug:' + slug,
|
||||
]
|
||||
|
||||
if season_number:
|
||||
playlist_id = f'season_{season_number}'
|
||||
playlist_title = f'Season {season_number}'
|
||||
facet_filters.append('search_season_list:' + playlist_title)
|
||||
def entries():
|
||||
yield from self._season_entries(show_path, season)
|
||||
else:
|
||||
playlist_id = show
|
||||
playlist_id = url_path or domain
|
||||
playlist_title = title
|
||||
|
||||
season_search = self._download_json(
|
||||
f'https://y1fnzxui30-dsn.algolia.net/1/indexes/everest_search_{slug}_season_desc_production',
|
||||
playlist_id, headers={
|
||||
'Origin': 'https://www.americastestkitchen.com',
|
||||
'X-Algolia-API-Key': '8d504d0099ed27c1b73708d22871d805',
|
||||
'X-Algolia-Application-Id': 'Y1FNZXUI30',
|
||||
}, query={
|
||||
'facetFilters': json.dumps(facet_filters),
|
||||
'attributesToRetrieve': f'description,search_{slug}_episode_number,search_document_date,search_url,title,search_atk_episode_season',
|
||||
'attributesToHighlight': '',
|
||||
'hitsPerPage': 1000,
|
||||
})
|
||||
|
||||
def entries():
|
||||
for episode in (season_search.get('hits') or []):
|
||||
search_url = episode.get('search_url') # always formatted like '/episode/123-title-of-episode'
|
||||
if not search_url:
|
||||
continue
|
||||
yield {
|
||||
'_type': 'url',
|
||||
'url': f'https://www.americastestkitchen.com{show_path or ""}{search_url}',
|
||||
'id': try_get(episode, lambda e: e['objectID'].split('_')[-1]),
|
||||
'title': episode.get('title'),
|
||||
'description': episode.get('description'),
|
||||
'timestamp': unified_timestamp(episode.get('search_document_date')),
|
||||
'season_number': season_number,
|
||||
'episode_number': int_or_none(episode.get(f'search_{slug}_episode_number')),
|
||||
'ie_key': AmericasTestKitchenIE.ie_key(),
|
||||
}
|
||||
def entries():
|
||||
for season_number in itertools.count(1):
|
||||
try:
|
||||
yield from self._season_entries(show_path, season_number)
|
||||
except ExtractorError as e:
|
||||
if isinstance(e.cause, HTTPError) and e.cause.status == 404:
|
||||
break
|
||||
raise
|
||||
|
||||
return self.playlist_result(
|
||||
entries(), playlist_id, playlist_title)
|
||||
|
||||
def _season_entries(self, show_path, season_number):
|
||||
webpage = self._download_webpage(
|
||||
f'https://www.americastestkitchen.com{show_path}/episodes/season-{season_number}',
|
||||
f'season-{season_number}', f'Downloading season {season_number} webpage')
|
||||
seen = set()
|
||||
for episode in re.finditer(
|
||||
r'<a [^>]*\bhref="(?P<path>/(?:cookscountry/|cooksillustrated/)?episode/(?P<id>\d+)-[^"]+)"[^>]*>\s*<h3[^>]*>(?P<title>[^<]+)</h3>',
|
||||
webpage):
|
||||
path = episode.group('path')
|
||||
if path in seen:
|
||||
continue
|
||||
seen.add(path)
|
||||
yield self.url_result(
|
||||
urljoin('https://www.americastestkitchen.com', path),
|
||||
AmericasTestKitchenIE, episode.group('id'),
|
||||
clean_html(episode.group('title')),
|
||||
season_number=season_number)
|
||||
|
||||
@@ -1,39 +1,22 @@
|
||||
import time
|
||||
|
||||
from .common import InfoExtractor
|
||||
from .applepodcasts import AppleBaseIE
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
extract_attributes,
|
||||
float_or_none,
|
||||
jwt_decode_hs256,
|
||||
jwt_encode,
|
||||
parse_resolution,
|
||||
qualities,
|
||||
unified_strdate,
|
||||
update_url,
|
||||
url_or_none,
|
||||
urljoin,
|
||||
)
|
||||
from ..utils.traversal import (
|
||||
find_element,
|
||||
require,
|
||||
traverse_obj,
|
||||
)
|
||||
|
||||
|
||||
class AppleConnectIE(InfoExtractor):
|
||||
class AppleConnectIE(AppleBaseIE):
|
||||
IE_NAME = 'apple:music:connect'
|
||||
IE_DESC = 'Apple Music Connect'
|
||||
|
||||
_BASE_URL = 'https://music.apple.com'
|
||||
_QUALITIES = {
|
||||
'provisionalUploadVideo': None,
|
||||
'sdVideo': 480,
|
||||
'sdVideoWithPlusAudio': 480,
|
||||
'sd480pVideo': 480,
|
||||
'720pHdVideo': 720,
|
||||
'1080pHdVideo': 1080,
|
||||
}
|
||||
_VALID_URL = r'https?://music\.apple\.com/[\w-]+/post/(?P<id>\d+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://music.apple.com/us/post/1018290019',
|
||||
@@ -59,29 +42,16 @@ class AppleConnectIE(InfoExtractor):
|
||||
},
|
||||
}]
|
||||
|
||||
_jwt = None
|
||||
|
||||
@staticmethod
|
||||
def _jwt_is_expired(token):
|
||||
return jwt_decode_hs256(token)['exp'] - time.time() < 120
|
||||
|
||||
def _get_token(self, webpage, video_id):
|
||||
if self._jwt and not self._jwt_is_expired(self._jwt):
|
||||
return self._jwt
|
||||
|
||||
js_url = traverse_obj(webpage, (
|
||||
{find_element(tag='script', attr='crossorigin', value='', html=True)},
|
||||
{extract_attributes}, 'src', {urljoin(self._BASE_URL)}, {require('JS URL')}))
|
||||
js = self._download_webpage(
|
||||
js_url, video_id, 'Downloading token JS', 'Unable to download token JS')
|
||||
|
||||
header = jwt_encode({}, '', headers={'alg': 'ES256', 'kid': 'WebPlayKid'}).split('.')[0]
|
||||
self._jwt = self._search_regex(
|
||||
fr'(["\'])(?P<jwt>{header}(?:\.[\w-]+){{2}})\1', js, 'JSON Web Token', group='jwt')
|
||||
if self._jwt_is_expired(self._jwt):
|
||||
raise ExtractorError('The fetched token is already expired')
|
||||
|
||||
return self._jwt
|
||||
_BASE_URL = 'https://music.apple.com'
|
||||
_JWT_KEY_ID = 'WebPlayKid'
|
||||
_QUALITIES = {
|
||||
'provisionalUploadVideo': None,
|
||||
'sdVideo': 480,
|
||||
'sdVideoWithPlusAudio': 480,
|
||||
'sd480pVideo': 480,
|
||||
'720pHdVideo': 720,
|
||||
'1080pHdVideo': 1080,
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
|
||||
@@ -1,15 +1,55 @@
|
||||
import time
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
clean_html,
|
||||
clean_podcast_url,
|
||||
int_or_none,
|
||||
jwt_decode_hs256,
|
||||
jwt_encode,
|
||||
parse_iso8601,
|
||||
try_call,
|
||||
update_url,
|
||||
url_or_none,
|
||||
urljoin,
|
||||
)
|
||||
from ..utils.traversal import traverse_obj
|
||||
|
||||
|
||||
class ApplePodcastsIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://podcasts\.apple\.com/(?:[^/]+/)?podcast(?:/[^/]+){1,2}.*?\bi=(?P<id>\d+)'
|
||||
class AppleBaseIE(InfoExtractor):
|
||||
"""Subclasses must set _BASE_URL and _JWT_KEY_ID"""
|
||||
|
||||
_jwt_cache = {}
|
||||
|
||||
@staticmethod
|
||||
def _jwt_is_expired(token):
|
||||
return jwt_decode_hs256(token)['exp'] - time.time() < 120
|
||||
|
||||
def _get_token(self, webpage, episode_id):
|
||||
if self._jwt_cache.get(self._BASE_URL) and not self._jwt_is_expired(self._jwt_cache[self._BASE_URL]):
|
||||
return self._jwt
|
||||
|
||||
js_path = self._search_regex(
|
||||
r'<script [^>]*\bsrc="(/assets/index~[0-9a-f]+\.js)">', webpage, 'JS asset path')
|
||||
js_code = self._download_webpage(
|
||||
urljoin(self._BASE_URL, js_path), episode_id,
|
||||
'Downloading JS asset', 'Unable to download JS asset')
|
||||
|
||||
header = jwt_encode({}, '', headers={'typ': 'JWT', 'alg': 'ES256', 'kid': self._JWT_KEY_ID}).split('.')[0]
|
||||
self._jwt_cache[self._BASE_URL] = self._search_regex(
|
||||
fr'(["\'])(?P<jwt>{header}(?:\.[\w-]+){{2}})\1', js_code, 'JSON Web Token', group='jwt')
|
||||
if self._jwt_is_expired(self._jwt_cache[self._BASE_URL]):
|
||||
raise ExtractorError('The fetched token is already expired')
|
||||
|
||||
return self._jwt_cache[self._BASE_URL]
|
||||
|
||||
|
||||
class ApplePodcastsIE(AppleBaseIE):
|
||||
IE_NAME = 'apple:podcasts'
|
||||
IE_DESC = 'Apple Podcasts'
|
||||
|
||||
_VALID_URL = r'https?://podcasts\.apple\.com/(?P<country>[^/?#]+/)?podcast(?:/[^/?#]+){1,2}/?\?(?:[^#]+&)?i=(?P<id>\d+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://podcasts.apple.com/us/podcast/urbana-podcast-724-by-david-penn/id1531349107?i=1000748574256',
|
||||
'md5': 'f8a6f92735d0cfbd5e6a7294151e28d8',
|
||||
@@ -23,7 +63,7 @@ class ApplePodcastsIE(InfoExtractor):
|
||||
'timestamp': 1770400801,
|
||||
'duration': 3602,
|
||||
'series': 'Urbana Radio Show',
|
||||
'thumbnail': 're:.+[.](png|jpe?g|webp)',
|
||||
'thumbnail': r're:https://.+/.+\.jpg',
|
||||
},
|
||||
}, {
|
||||
'url': 'https://podcasts.apple.com/us/podcast/207-whitney-webb-returns/id1135137367?i=1000482637777',
|
||||
@@ -39,7 +79,7 @@ class ApplePodcastsIE(InfoExtractor):
|
||||
'timestamp': 1593932400,
|
||||
'duration': 5369,
|
||||
'series': 'The Tim Dillon Show',
|
||||
'thumbnail': 're:.+[.](png|jpe?g|webp)',
|
||||
'thumbnail': r're:https://.+/.+\.jpg',
|
||||
},
|
||||
}, {
|
||||
'url': 'https://podcasts.apple.com/podcast/207-whitney-webb-returns/id1135137367?i=1000482637777',
|
||||
@@ -52,15 +92,55 @@ class ApplePodcastsIE(InfoExtractor):
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
episode_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, episode_id)
|
||||
_BASE_URL = 'https://podcasts.apple.com'
|
||||
_JWT_KEY_ID = 'C4J7GBP74H'
|
||||
|
||||
def _extract_podcast_from_api(self, webpage, episode_id, country_code):
|
||||
data = self._download_json(
|
||||
f'https://amp-api.podcasts.apple.com/v1/catalog/{country_code or "us"}/podcast-episodes/{episode_id}',
|
||||
episode_id, headers={
|
||||
'Authorization': f'Bearer {self._get_token(webpage, episode_id)}',
|
||||
'Origin': self._BASE_URL,
|
||||
},
|
||||
query={
|
||||
# XXX: if video is available, try adding the params 'with=entitlements,hlsVideo'
|
||||
'extend': 'fullDescription',
|
||||
'include': 'podcast',
|
||||
'l': 'en-US',
|
||||
})['data'][0]
|
||||
|
||||
thumb_info = traverse_obj(data, ('attributes', 'artwork', {
|
||||
'url': ('url', {url_or_none}),
|
||||
'h': ('height', {int_or_none}),
|
||||
'w': ('width', {int_or_none}),
|
||||
}))
|
||||
|
||||
return {
|
||||
'id': episode_id,
|
||||
**traverse_obj(data, {
|
||||
'title': ('attributes', 'name', {str}),
|
||||
'description': ('attributes', 'fullDescription', {clean_html}),
|
||||
'url': ('attributes', 'assetUrl', {clean_podcast_url}, {update_url(scheme='https')}),
|
||||
'timestamp': ('attributes', 'releaseDateTime', {parse_iso8601}),
|
||||
'duration': ('attributes', 'durationInMilliseconds', {int_or_none(scale=1000)}),
|
||||
'episode': ('attributes', 'name', {str}),
|
||||
'episode_number': ('attributes', 'episodeNumber', {int_or_none}),
|
||||
'series': ('relationships', 'podcast', 'data', 0, 'attributes', 'name', {str}),
|
||||
}),
|
||||
'thumbnail': try_call(lambda: thumb_info.pop('url').format(f='jpg', **thumb_info)),
|
||||
'vcodec': 'none',
|
||||
}
|
||||
|
||||
def _extract_podcast_from_webpage(self, webpage, episode_id):
|
||||
server_data = self._search_json(
|
||||
r'<script [^>]*\bid=["\']serialized-server-data["\'][^>]*>', webpage,
|
||||
'server data', episode_id)['data'][0]['data']
|
||||
'server data', episode_id, default=None)
|
||||
model_data = traverse_obj(server_data, (
|
||||
'headerButtonItems', lambda _, v: v['$kind'] == 'share' and v['modelType'] == 'EpisodeLockup',
|
||||
'data', 0, 'data', 'headerButtonItems',
|
||||
lambda _, v: v['$kind'] == 'share' and v['modelType'] == 'EpisodeLockup',
|
||||
'model', {dict}, any))
|
||||
if not model_data:
|
||||
return None
|
||||
|
||||
return {
|
||||
'id': episode_id,
|
||||
@@ -77,3 +157,12 @@ class ApplePodcastsIE(InfoExtractor):
|
||||
'thumbnail': self._og_search_thumbnail(webpage),
|
||||
'vcodec': 'none',
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
episode_id, country_code = self._match_valid_url(url).group('id', 'country')
|
||||
# Webpage may be unavailable, see https://github.com/yt-dlp/yt-dlp/issues/17266
|
||||
webpage = self._download_webpage(url, episode_id, expected_status=500)
|
||||
|
||||
return (
|
||||
self._extract_podcast_from_webpage(webpage, episode_id)
|
||||
or self._extract_podcast_from_api(webpage, episode_id, country_code))
|
||||
|
||||
@@ -11,15 +11,12 @@ from ..utils import (
|
||||
join_nonempty,
|
||||
jwt_decode_hs256,
|
||||
make_archive_id,
|
||||
parse_duration,
|
||||
parse_iso8601,
|
||||
remove_start,
|
||||
str_or_none,
|
||||
unified_strdate,
|
||||
update_url,
|
||||
update_url_query,
|
||||
url_or_none,
|
||||
xpath_text,
|
||||
)
|
||||
from ..utils.traversal import traverse_obj, value
|
||||
|
||||
@@ -119,118 +116,6 @@ class ARDMediathekBaseIE(InfoExtractor):
|
||||
return formats
|
||||
|
||||
|
||||
class ARDIE(InfoExtractor):
|
||||
_VALID_URL = r'(?P<mainurl>https?://(?:www\.)?daserste\.de/(?:[^/?#&]+/)+(?P<id>[^/?#&]+))\.html'
|
||||
_TESTS = [{
|
||||
# available till 7.12.2023
|
||||
'url': 'https://www.daserste.de/information/talk/maischberger/videos/maischberger-video-424.html',
|
||||
'md5': '94812e6438488fb923c361a44469614b',
|
||||
'info_dict': {
|
||||
'id': 'maischberger-video-424',
|
||||
'display_id': 'maischberger-video-424',
|
||||
'ext': 'mp4',
|
||||
'duration': 4452.0,
|
||||
'title': 'maischberger am 07.12.2022',
|
||||
'upload_date': '20221207',
|
||||
'thumbnail': r're:^https?://.*\.jpg$',
|
||||
},
|
||||
}, {
|
||||
'url': 'https://www.daserste.de/information/politik-weltgeschehen/morgenmagazin/videosextern/dominik-kahun-aus-der-nhl-direkt-zur-weltmeisterschaft-100.html',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.daserste.de/information/nachrichten-wetter/tagesthemen/videosextern/tagesthemen-17736.html',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.daserste.de/unterhaltung/serie/in-aller-freundschaft-die-jungen-aerzte/videos/diversity-tag-sanam-afrashteh100.html',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'http://www.daserste.de/information/reportage-dokumentation/dokus/videos/die-story-im-ersten-mission-unter-falscher-flagge-100.html',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.daserste.de/unterhaltung/serie/in-aller-freundschaft-die-jungen-aerzte/Drehpause-100.html',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.daserste.de/unterhaltung/film/filmmittwoch-im-ersten/videos/making-ofwendezeit-video-100.html',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = self._match_valid_url(url)
|
||||
display_id = mobj.group('id')
|
||||
|
||||
player_url = mobj.group('mainurl') + '~playerXml.xml'
|
||||
doc = self._download_xml(player_url, display_id)
|
||||
video_node = doc.find('./video')
|
||||
upload_date = unified_strdate(xpath_text(
|
||||
video_node, './broadcastDate'))
|
||||
thumbnail = xpath_text(video_node, './/teaserImage//variant/url')
|
||||
|
||||
formats = []
|
||||
for a in video_node.findall('.//asset'):
|
||||
file_name = xpath_text(a, './fileName', default=None)
|
||||
if not file_name:
|
||||
continue
|
||||
format_type = a.attrib.get('type')
|
||||
format_url = url_or_none(file_name)
|
||||
if format_url:
|
||||
ext = determine_ext(file_name)
|
||||
if ext == 'm3u8':
|
||||
formats.extend(self._extract_m3u8_formats(
|
||||
format_url, display_id, 'mp4', entry_protocol='m3u8_native',
|
||||
m3u8_id=format_type or 'hls', fatal=False))
|
||||
continue
|
||||
elif ext == 'f4m':
|
||||
formats.extend(self._extract_f4m_formats(
|
||||
update_url_query(format_url, {'hdcore': '3.7.0'}),
|
||||
display_id, f4m_id=format_type or 'hds', fatal=False))
|
||||
continue
|
||||
f = {
|
||||
'format_id': format_type,
|
||||
'width': int_or_none(xpath_text(a, './frameWidth')),
|
||||
'height': int_or_none(xpath_text(a, './frameHeight')),
|
||||
'vbr': int_or_none(xpath_text(a, './bitrateVideo')),
|
||||
'abr': int_or_none(xpath_text(a, './bitrateAudio')),
|
||||
'vcodec': xpath_text(a, './codecVideo'),
|
||||
'tbr': int_or_none(xpath_text(a, './totalBitrate')),
|
||||
}
|
||||
server_prefix = xpath_text(a, './serverPrefix', default=None)
|
||||
if server_prefix:
|
||||
f.update({
|
||||
'url': server_prefix,
|
||||
'playpath': file_name,
|
||||
})
|
||||
else:
|
||||
if not format_url:
|
||||
continue
|
||||
f['url'] = format_url
|
||||
formats.append(f)
|
||||
|
||||
_SUB_FORMATS = (
|
||||
('./dataTimedText', 'ttml'),
|
||||
('./dataTimedTextNoOffset', 'ttml'),
|
||||
('./dataTimedTextVtt', 'vtt'),
|
||||
)
|
||||
|
||||
subtitles = {}
|
||||
for subsel, subext in _SUB_FORMATS:
|
||||
for node in video_node.findall(subsel):
|
||||
subtitles.setdefault('de', []).append({
|
||||
'url': node.attrib['url'],
|
||||
'ext': subext,
|
||||
})
|
||||
|
||||
return {
|
||||
'id': xpath_text(video_node, './videoId', default=display_id),
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
'display_id': display_id,
|
||||
'title': video_node.find('./title').text,
|
||||
'duration': parse_duration(video_node.find('./duration').text),
|
||||
'upload_date': upload_date,
|
||||
'thumbnail': thumbnail,
|
||||
}
|
||||
|
||||
|
||||
class ARDBetaMediathekIE(InfoExtractor):
|
||||
IE_NAME = 'ARDMediathek'
|
||||
_VALID_URL = r'''(?x)https?://
|
||||
|
||||
@@ -3542,7 +3542,7 @@ class InfoExtractor:
|
||||
query = urllib.parse.urlparse(url).query
|
||||
url = re.sub(r'/(?:manifest|playlist|jwplayer)\.(?:m3u8|f4m|mpd|smil)', '', url)
|
||||
mobj = re.search(
|
||||
r'(?:(?:http|rtmp|rtsp)(?P<s>s)?:)?(?P<url>//[^?]+)', url)
|
||||
r'(?:(?:http|rtmp)(?P<s>s)?:)?(?P<url>//[^?]+)', url)
|
||||
url_base = mobj.group('url')
|
||||
http_base_url = '{}{}:{}'.format('http', mobj.group('s') or '', url_base)
|
||||
formats = []
|
||||
@@ -3567,28 +3567,16 @@ class InfoExtractor:
|
||||
video_id, mpd_id='dash', fatal=False))
|
||||
if re.search(r'(?:/smil:|\.smil)', url_base):
|
||||
if 'smil' not in skip_protocols:
|
||||
rtmp_formats = self._extract_smil_formats(
|
||||
formats.extend(self._extract_smil_formats(
|
||||
manifest_url('jwplayer.smil'),
|
||||
video_id, fatal=False)
|
||||
for rtmp_format in rtmp_formats:
|
||||
rtsp_format = rtmp_format.copy()
|
||||
rtsp_format['url'] = '{}/{}'.format(rtmp_format['url'], rtmp_format['play_path'])
|
||||
del rtsp_format['play_path']
|
||||
del rtsp_format['ext']
|
||||
rtsp_format.update({
|
||||
'url': rtsp_format['url'].replace('rtmp://', 'rtsp://'),
|
||||
'format_id': rtmp_format['format_id'].replace('rtmp', 'rtsp'),
|
||||
'protocol': 'rtsp',
|
||||
})
|
||||
formats.extend([rtmp_format, rtsp_format])
|
||||
video_id, fatal=False))
|
||||
else:
|
||||
for protocol in ('rtmp', 'rtsp'):
|
||||
if protocol not in skip_protocols:
|
||||
formats.append({
|
||||
'url': f'{protocol}:{url_base}',
|
||||
'format_id': protocol,
|
||||
'protocol': protocol,
|
||||
})
|
||||
if 'rtmp' not in skip_protocols:
|
||||
formats.append({
|
||||
'url': f'rtmp:{url_base}',
|
||||
'format_id': 'rtmp',
|
||||
'protocol': 'rtmp',
|
||||
})
|
||||
return formats
|
||||
|
||||
def _find_jwplayer_data(self, webpage, video_id=None, transform_source=js_to_json):
|
||||
|
||||
@@ -29,34 +29,6 @@ class RtmpIE(InfoExtractor):
|
||||
}
|
||||
|
||||
|
||||
class MmsIE(InfoExtractor):
|
||||
IE_DESC = False # Do not list
|
||||
_VALID_URL = r'(?i)mms://.+'
|
||||
|
||||
_TEST = {
|
||||
# Direct MMS link
|
||||
'url': 'mms://kentro.kaist.ac.kr/200907/MilesReid(0709).wmv',
|
||||
'info_dict': {
|
||||
'id': 'MilesReid(0709)',
|
||||
'ext': 'wmv',
|
||||
'title': 'MilesReid(0709)',
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True, # rtsp downloads, requiring mplayer or mpv
|
||||
},
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._generic_id(url)
|
||||
title = self._generic_title(url)
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
'url': url,
|
||||
}
|
||||
|
||||
|
||||
class ViewSourceIE(InfoExtractor):
|
||||
IE_DESC = False
|
||||
_VALID_URL = r'view-source:(?P<url>.+)'
|
||||
|
||||
@@ -11,6 +11,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class DigitallySpeakingIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
_VALID_URL = r'https?://(?:s?evt\.dispeak|events\.digitallyspeaking)\.com/(?:[^/]+/)+xml/(?P<id>[^.]+)\.xml'
|
||||
|
||||
_TESTS = [{
|
||||
|
||||
@@ -138,7 +138,7 @@ class FilmOnChannelIE(InfoExtractor):
|
||||
continue
|
||||
if not is_live:
|
||||
formats.extend(self._extract_wowza_formats(
|
||||
stream_url, channel_id, skip_protocols=['dash', 'rtmp', 'rtsp']))
|
||||
stream_url, channel_id, skip_protocols=['dash', 'rtmp']))
|
||||
continue
|
||||
quality = stream.get('quality')
|
||||
formats.append({
|
||||
|
||||
@@ -10,6 +10,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class FolketingetIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
IE_DESC = 'Folketinget (ft.dk; Danish parliament)'
|
||||
_VALID_URL = r'https?://(?:www\.)?ft\.dk/webtv/video/[^?#]*?\.(?P<id>[0-9]+)\.aspx'
|
||||
_TEST = {
|
||||
|
||||
@@ -42,7 +42,6 @@ def _id_to_pk(shortcode):
|
||||
|
||||
|
||||
class InstagramBaseIE(InfoExtractor):
|
||||
_API_BASE_URL = 'https://i.instagram.com/api/v1'
|
||||
_BASE_URL = 'https://www.instagram.com/'
|
||||
_APP_IDS = {
|
||||
'ios': '124024574287414',
|
||||
@@ -75,6 +74,12 @@ class InstagramBaseIE(InfoExtractor):
|
||||
def _is_web_app(self):
|
||||
return self._app_id == self._APP_IDS['web']
|
||||
|
||||
@property
|
||||
def _API_BASE_URL(self):
|
||||
if not self._is_web_app:
|
||||
return 'https://i.instagram.com/api/v1'
|
||||
return 'https://www.instagram.com/api/v1'
|
||||
|
||||
@property
|
||||
def _api_headers(self):
|
||||
return {
|
||||
@@ -87,7 +92,8 @@ class InstagramBaseIE(InfoExtractor):
|
||||
|
||||
@staticmethod
|
||||
def _is_login_redirect(url):
|
||||
return urllib.parse.urlparse(url).path.startswith('/accounts/login')
|
||||
path = urllib.parse.urlparse(url).path
|
||||
return path.startswith('/accounts/login') or path == '/'
|
||||
|
||||
def _get_count(self, media, kind, *keys):
|
||||
return traverse_obj(
|
||||
|
||||
@@ -2,6 +2,7 @@ from .common import InfoExtractor
|
||||
|
||||
|
||||
class KaraoketvIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
_VALID_URL = r'https?://(?:www\.)?karaoketv\.co\.il/[^/]+/(?P<id>\d+)'
|
||||
_TEST = {
|
||||
'url': 'http://www.karaoketv.co.il/%D7%A9%D7%99%D7%A8%D7%99_%D7%A7%D7%A8%D7%99%D7%95%D7%A7%D7%99/58356/%D7%90%D7%99%D7%96%D7%95%D7%9F',
|
||||
|
||||
@@ -37,10 +37,7 @@ class MangomoloBaseIE(InfoExtractor):
|
||||
m3u8_entry_protocol = 'm3u8' if self._IS_LIVE else 'm3u8_native'
|
||||
|
||||
format_url = self._html_search_regex(
|
||||
[
|
||||
r'(?:file|src)\s*:\s*"(https?://[^"]+?/playlist\.m3u8)',
|
||||
r'<a[^>]+href="(rtsp://[^"]+)"',
|
||||
], webpage, 'format url')
|
||||
r'(?:file|src)\s*:\s*"(https?://[^"]+?/playlist\.m3u8)', webpage, 'format url')
|
||||
formats = self._extract_wowza_formats(
|
||||
format_url, page_id, m3u8_entry_protocol, ['smil'])
|
||||
|
||||
@@ -58,6 +55,18 @@ class MangomoloVideoIE(MangomoloBaseIE):
|
||||
_TYPE = 'video'
|
||||
IE_NAME = 'mangomolo:' + _TYPE
|
||||
_SLUG = r'video\?.*?\bid=(?P<id>\d+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://player.mangomolo.com/v1/video?id=29431242&user_id=168&signature=b40e58d964532fe09bf81fc08d850752&autoplay=true&fullscreen=yes&base_url=aHR0cHM6Ly9heW4ub20vdmlkZW8vMjk0MzEyNDIvJUQ4JUE3JUQ5JTg0JUQ4JUEzJUQ5JTg1JUQ5JTg2JUQ5JThBJUQ4JUE3JUQ4JUFBLSVEOCVBNyVEOSU4NCVEOCVCMyVEOCVBOCVEOCVCOS0lRDglQTclRDklODQlRDglQUQlRDklODQlRDklODIlRDglQTktOQ%3D%3D&vast=true&app_id=&zone=&filter=DENY&countries=Q0M%3D&language=ar&player_profile=',
|
||||
'info_dict': {
|
||||
'id': '29431242',
|
||||
'ext': 'flv',
|
||||
'title': '29431242',
|
||||
},
|
||||
'expected_warnings': [
|
||||
'Failed to download m3u8 information',
|
||||
'Failed to download MPD manifest',
|
||||
],
|
||||
}]
|
||||
|
||||
_IS_LIVE = False
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ from .common import InfoExtractor
|
||||
|
||||
|
||||
class OktoberfestTVIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
_VALID_URL = r'https?://(?:www\.)?oktoberfest-tv\.de/[^/]+/[^/]+/video/(?P<id>[^/?#]+)'
|
||||
|
||||
_TEST = {
|
||||
|
||||
@@ -10,6 +10,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class PlaytvakIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
IE_DESC = 'Playtvak.cz, iDNES.cz and Lidovky.cz'
|
||||
_VALID_URL = r'https?://(?:.+?\.)?(?:playtvak|idnes|lidovky|metro)\.cz/.*\?(?:c|idvideo)=(?P<id>[^&]+)'
|
||||
_TESTS = [{
|
||||
|
||||
@@ -5,6 +5,7 @@ from ..utils import int_or_none
|
||||
|
||||
|
||||
class RTL2IE(InfoExtractor):
|
||||
_WORKING = False
|
||||
IE_NAME = 'rtl2'
|
||||
_VALID_URL = r'https?://(?:www\.)?rtl2\.de/sendung/[^/]+/(?:video/(?P<vico_id>\d+)[^/]+/(?P<vivi_id>\d+)-|folge/)(?P<id>[^/?#]+)'
|
||||
_TESTS = [{
|
||||
|
||||
@@ -1,79 +1,134 @@
|
||||
import datetime as dt
|
||||
import json
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
UserNotLive,
|
||||
clean_html,
|
||||
extract_attributes,
|
||||
int_or_none,
|
||||
urljoin,
|
||||
str_or_none,
|
||||
url_or_none,
|
||||
)
|
||||
from ..utils.traversal import (
|
||||
find_element,
|
||||
require,
|
||||
traverse_obj,
|
||||
)
|
||||
|
||||
|
||||
class ShowRoomLiveIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?showroom-live\.com/(?!onlive|timetable|event|campaign|news|ranking|room)(?P<id>[^/?#&]+)'
|
||||
_TEST = {
|
||||
'url': 'https://www.showroom-live.com/48_Nana_Okada',
|
||||
IE_NAME = 'showroom:live'
|
||||
IE_DESC = 'SHOWROOM'
|
||||
|
||||
_VALID_URL = r'https?://(?:www\.)?showroom-live\.com/r/(?P<id>[\w-]+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.showroom-live.com/r/48_Yui_Oguri',
|
||||
'only_matching': True,
|
||||
}
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
broadcaster_id = self._match_id(url)
|
||||
webpage = self._download_webpage(
|
||||
url, broadcaster_id, headers={'Accept-Language': 'ja'})
|
||||
nuxt_data = self._search_nuxt_json(webpage, broadcaster_id)['data']
|
||||
|
||||
webpage = self._download_webpage(url, broadcaster_id)
|
||||
cookies = self._get_cookies(url)
|
||||
sr_id = traverse_obj(cookies, ('sr_id', 'value', {str}, filter))
|
||||
if not sr_id:
|
||||
self.raise_login_required()
|
||||
|
||||
room_id = self._search_regex(
|
||||
(r'SrGlobal\.roomId\s*=\s*(\d+)',
|
||||
r'(?:profile|room)\?room_id\=(\d+)'), webpage, 'room_id')
|
||||
room_profile = traverse_obj(nuxt_data, (
|
||||
f'roomProfile-{broadcaster_id}-{sr_id}', {dict}))
|
||||
start_timestamp = traverse_obj(room_profile, ('current_live_started_at', {int_or_none}))
|
||||
is_live = traverse_obj(room_profile, ('is_onlive', {bool}))
|
||||
|
||||
room = self._download_json(
|
||||
urljoin(url, f'/api/room/profile?room_id={room_id}'),
|
||||
broadcaster_id)
|
||||
if not is_live:
|
||||
if start_timestamp:
|
||||
start_time = dt.datetime.fromtimestamp(
|
||||
start_timestamp, dt.timezone.utc,
|
||||
).astimezone().strftime('%Y-%m-%d %H:%M:%S %Z')
|
||||
|
||||
is_live = room.get('is_onlive')
|
||||
if is_live is not True:
|
||||
raise ExtractorError(f'{broadcaster_id} is offline', expected=True)
|
||||
self.raise_no_formats(
|
||||
f'Next livestream is scheduled to start at {start_time}', expected=True)
|
||||
|
||||
uploader = room.get('performer_name') or broadcaster_id
|
||||
title = room.get('room_name') or room.get('main_name') or uploader
|
||||
return {
|
||||
'id': broadcaster_id,
|
||||
'live_status': 'is_upcoming',
|
||||
'release_timestamp': start_timestamp,
|
||||
}
|
||||
raise UserNotLive(video_id=broadcaster_id)
|
||||
|
||||
room_id = traverse_obj(room_profile, ('room_id', {str_or_none}))
|
||||
room_name = traverse_obj(room_profile, (
|
||||
('room_name', 'main_name'), {clean_html}, filter, any))
|
||||
|
||||
streaming_url_list = self._download_json(
|
||||
urljoin(url, f'/api/live/streaming_url?room_id={room_id}'),
|
||||
broadcaster_id)['streaming_url_list']
|
||||
|
||||
formats = []
|
||||
for stream in streaming_url_list:
|
||||
stream_url = stream.get('url')
|
||||
if not stream_url:
|
||||
continue
|
||||
stream_type = stream.get('type')
|
||||
if stream_type == 'hls':
|
||||
m3u8_formats = self._extract_m3u8_formats(
|
||||
stream_url, broadcaster_id, ext='mp4', m3u8_id='hls',
|
||||
live=True)
|
||||
for f in m3u8_formats:
|
||||
f['quality'] = int_or_none(stream.get('quality', 100))
|
||||
formats.extend(m3u8_formats)
|
||||
elif stream_type == 'rtmp':
|
||||
stream_name = stream.get('stream_name')
|
||||
if not stream_name:
|
||||
continue
|
||||
formats.append({
|
||||
'url': stream_url,
|
||||
'play_path': stream_name,
|
||||
'page_url': url,
|
||||
'player_url': 'https://www.showroom-live.com/assets/swf/v3/ShowRoomLive.swf',
|
||||
'rtmp_live': True,
|
||||
'ext': 'flv',
|
||||
'format_id': 'rtmp',
|
||||
'format_note': stream.get('label'),
|
||||
'quality': int_or_none(stream.get('quality', 100)),
|
||||
})
|
||||
'https://www.showroom-live.com/api/live/streaming_url',
|
||||
broadcaster_id, query={'room_id': room_id})
|
||||
m3u8_url = traverse_obj(streaming_url_list, (
|
||||
'streaming_url_list', lambda _, v: v['type'] == 'hls_all',
|
||||
'url', {url_or_none}, any, {require('m3u8 URL')}))
|
||||
|
||||
return {
|
||||
'id': str(room.get('live_id') or broadcaster_id),
|
||||
'title': title,
|
||||
'description': room.get('description'),
|
||||
'timestamp': int_or_none(room.get('current_live_started_at')),
|
||||
'uploader': uploader,
|
||||
'uploader_id': broadcaster_id,
|
||||
'view_count': int_or_none(room.get('view_num')),
|
||||
'formats': formats,
|
||||
'is_live': True,
|
||||
'title': room_name,
|
||||
'channel': room_name,
|
||||
'channel_id': broadcaster_id,
|
||||
'formats': self._extract_m3u8_formats(m3u8_url, broadcaster_id, 'mp4'),
|
||||
'is_live': is_live,
|
||||
'release_timestamp': start_timestamp,
|
||||
**traverse_obj(room_profile, {
|
||||
'id': ('live_id', {str_or_none}),
|
||||
'channel_follower_count': ('follower_num', {int_or_none}),
|
||||
'channel_is_verified': ('is_official', {bool}),
|
||||
'description': ('description', {clean_html}, filter),
|
||||
'genres': ('genre_name', {clean_html}, filter, all, filter),
|
||||
'tags': ('live_tags', ..., 'name', {clean_html}, filter, all, filter),
|
||||
'thumbnail': ('image_square', {url_or_none}),
|
||||
'view_count': ('view_num', {int_or_none}),
|
||||
}),
|
||||
}
|
||||
|
||||
|
||||
class ShowRoomVodIE(InfoExtractor):
|
||||
IE_NAME = 'showroom:vod'
|
||||
|
||||
_VALID_URL = r'https?://(?:www\.)?showroom-live\.com/episode/watch\?(?:[^#]+&)?id=(?P<id>\w+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.showroom-live.com/episode/watch?id=214',
|
||||
'info_dict': {
|
||||
'id': '214',
|
||||
'ext': 'mp4',
|
||||
'title': 'aaa',
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
episode_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, episode_id)
|
||||
episode_data = traverse_obj(webpage, (
|
||||
{find_element(id='episode-data', html=True)},
|
||||
{extract_attributes}, 'data-episode', {json.loads}, {dict}))
|
||||
|
||||
streaming_url_list = self._download_json(
|
||||
'https://www.showroom-live.com/api/episode/streaming_url',
|
||||
episode_id, query={'episode_id': episode_id})
|
||||
m3u8_url = traverse_obj(streaming_url_list, (
|
||||
'streaming_url_list', 'hls_all',
|
||||
'hls_all', {url_or_none}, {require('m3u8 URL')}))
|
||||
|
||||
return {
|
||||
'id': episode_id,
|
||||
'formats': self._extract_m3u8_formats(m3u8_url, episode_id, 'mp4'),
|
||||
'thumbnail': traverse_obj(streaming_url_list, ('thumbnail_url', {url_or_none})),
|
||||
**traverse_obj(episode_data, {
|
||||
'title': ('title', {clean_html}, filter),
|
||||
'description': ('description', {clean_html}, filter),
|
||||
'duration': ('video_time', {int_or_none}),
|
||||
'timestamp': ('display_started_at', {int_or_none}),
|
||||
}),
|
||||
**traverse_obj(episode_data, ('series', {
|
||||
'series': ('name', {clean_html}, filter),
|
||||
'series_id': ('id', {str_or_none}),
|
||||
})),
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ class KnownLiabilityIE(UnsupportedInfoExtractor):
|
||||
"""
|
||||
|
||||
URLS = (
|
||||
r'motherless\.com',
|
||||
r'motherless\.\w+',
|
||||
r'suno\.com',
|
||||
r'udio\.com',
|
||||
)
|
||||
|
||||
+17
-26
@@ -49,7 +49,7 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||
'Cannot download embed-only video without embedding URL. Please call yt-dlp '
|
||||
'with the URL of the page that embeds this video.')
|
||||
|
||||
_DEFAULT_CLIENT = 'macos'
|
||||
_DEFAULT_CLIENT = 'macos_basic'
|
||||
_DEFAULT_AUTHED_CLIENT = 'web'
|
||||
_CLIENT_HEADERS = {
|
||||
'Accept': 'application/vnd.vimeo.*+json; version=3.4.10',
|
||||
@@ -59,7 +59,6 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||
'android': {
|
||||
'CACHE_KEY': 'oauth-token-android',
|
||||
'CACHE_ONLY': True,
|
||||
'VIEWER_JWT': False,
|
||||
'REQUIRES_AUTH': False,
|
||||
'AUTH': 'NzRmYTg5YjgxMWExY2JiNzUwZDg1MjhkMTYzZjQ4YWYyOGEyZGJlMTp4OGx2NFd3QnNvY1lkamI2UVZsdjdDYlNwSDUrdm50YzdNNThvWDcwN1JrenJGZC9tR1lReUNlRjRSVklZeWhYZVpRS0tBcU9YYzRoTGY2Z1dlVkJFYkdJc0dMRHpoZWFZbU0reDRqZ1dkZ1diZmdIdGUrNUM5RVBySlM0VG1qcw==',
|
||||
'USER_AGENT': 'com.vimeo.android.videoapp (OnePlus, ONEPLUS A6003, OnePlus, Android 14/34 Version 11.8.1) Kotlin VimeoNetworking/3.12.0',
|
||||
@@ -71,26 +70,8 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||
'resource_key', 'badge', 'upload', 'transcode', 'is_playable', 'has_audio',
|
||||
),
|
||||
},
|
||||
'ios': {
|
||||
'CACHE_KEY': 'oauth-token-ios',
|
||||
'CACHE_ONLY': True,
|
||||
'VIEWER_JWT': False,
|
||||
'REQUIRES_AUTH': False,
|
||||
'AUTH': 'MTMxNzViY2Y0NDE0YTQ5YzhjZTc0YmU0NjVjNDQxYzNkYWVjOWRlOTpHKzRvMmgzVUh4UkxjdU5FRW80cDNDbDhDWGR5dVJLNUJZZ055dHBHTTB4V1VzaG41bEx1a2hiN0NWYWNUcldSSW53dzRUdFRYZlJEZmFoTTArOTBUZkJHS3R4V2llYU04Qnl1bERSWWxUdXRidjNqR2J4SHFpVmtFSUcyRktuQw==',
|
||||
'USER_AGENT': 'Vimeo/11.10.0 (com.vimeo; build:250424.164813.0; iOS 18.4.1) Alamofire/5.9.0 VimeoNetworking/5.0.0',
|
||||
'VIDEOS_FIELDS': (
|
||||
'uri', 'name', 'description', 'type', 'link', 'player_embed_url', 'duration',
|
||||
'width', 'language', 'height', 'embed', 'created_time', 'modified_time', 'release_time',
|
||||
'content_rating', 'content_rating_class', 'rating_mod_locked', 'license', 'config_url',
|
||||
'embed_player_config_url', 'privacy', 'pictures', 'tags', 'stats', 'categories', 'uploader',
|
||||
'metadata', 'user', 'files', 'download', 'app', 'play', 'status', 'resource_key', 'badge',
|
||||
'upload', 'transcode', 'is_playable', 'has_audio',
|
||||
),
|
||||
},
|
||||
'macos': {
|
||||
'CACHE_KEY': 'oauth-token-macos',
|
||||
'macos_basic': {
|
||||
'CACHE_ONLY': False,
|
||||
'VIEWER_JWT': False,
|
||||
'REQUIRES_AUTH': False,
|
||||
'AUTH': 'NDc1N2JlN2Y5ZjZmMjU3NzE3NTRkZTg1NmY2YzU2MTI0OTFlNjJiYjpwVUNDWUlBZmZqSHhQcndBYWxGMzgyYys2NkN5d1JrREJZZXdPcEdsU05tdjFlVVo2aE1lYk9GcWE3ZW9KVldlYnFlOWh5Vno5UWtpUGJ5empYZFBpYkFwV0FFTnB5VWV4ZEh3aHZnRUNEL0VySnBzTmFraDdNbS9nMXhWanhIcw==',
|
||||
'USER_AGENT': 'Vimeo/1.6.3 (com.vimeo.mac; build:251121.142637.0; macOS 13.7.8) Alamofire/5.9.0 VimeoNetworking/5.0.0',
|
||||
@@ -104,7 +85,6 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||
},
|
||||
'web': {
|
||||
'CACHE_ONLY': False,
|
||||
'VIEWER_JWT': True,
|
||||
'REQUIRES_AUTH': True,
|
||||
'USER_AGENT': None,
|
||||
'VIDEOS_FIELDS': (
|
||||
@@ -182,7 +162,8 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||
if self._LOGIN_REQUIRED:
|
||||
self.raise_login_required()
|
||||
|
||||
if self._DEFAULT_CLIENT != 'web':
|
||||
# Don't auto-load token from cache if the user has specified a client
|
||||
if self._configuration_arg('client', [None], ie_key=VimeoIE)[0]:
|
||||
return
|
||||
|
||||
for client_name, client_config in self._CLIENT_CONFIGS.items():
|
||||
@@ -367,11 +348,14 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||
}
|
||||
|
||||
def _fetch_oauth_token(self, client):
|
||||
client_config = self._CLIENT_CONFIGS[client]
|
||||
|
||||
if client_config['VIEWER_JWT']:
|
||||
base_client, _, variant = client.partition('_')
|
||||
if base_client == 'web':
|
||||
return f'jwt {self._fetch_viewer_info()["jwt"]}'
|
||||
|
||||
client_config = self._CLIENT_CONFIGS[client]
|
||||
if variant == 'basic':
|
||||
return f'Basic {client_config["AUTH"]}'
|
||||
|
||||
cache_key = client_config['CACHE_KEY']
|
||||
|
||||
if not self._oauth_tokens.get(cache_key):
|
||||
@@ -1213,6 +1197,9 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
||||
'If your IP address is located in Europe you could try using a VPN/proxy,',
|
||||
f'or else u{self._login_hint()[1:]}',
|
||||
delim=' '), method=None)
|
||||
# XXX: Temporary while macos_basic is the default client
|
||||
elif e.cause.status == 401 and self._get_requested_client() == 'macos_basic':
|
||||
self.raise_login_required('The Vimeo extractor only works when logged-in')
|
||||
else:
|
||||
raise
|
||||
|
||||
@@ -1221,6 +1208,10 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
||||
else:
|
||||
info = self._parse_api_response(video, video_id, unlisted_hash)
|
||||
|
||||
# XXX: Temporary while macos_basic is the default client
|
||||
if not info.get('formats') and self._get_requested_client() == 'macos_basic':
|
||||
self.raise_login_required('The Vimeo extractor only works when logged-in')
|
||||
|
||||
source_format = self._extract_original_format(
|
||||
f'https://vimeo.com/{video_id}', video_id, unlisted_hash)
|
||||
if source_format:
|
||||
|
||||
@@ -8,6 +8,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class WallaIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
_VALID_URL = r'https?://vod\.walla\.co\.il/[^/]+/(?P<id>\d+)/(?P<display_id>.+)'
|
||||
_TEST = {
|
||||
'url': 'http://vod.walla.co.il/movie/2642630/one-direction-all-for-one',
|
||||
|
||||
@@ -9,6 +9,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class WhoWatchIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
IE_NAME = 'whowatch'
|
||||
_VALID_URL = r'https?://whowatch\.tv/viewer/(?P<id>\d+)'
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'WEB',
|
||||
'clientVersion': '2.20260114.08.00',
|
||||
'clientVersion': '2.20260708.00.00',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 1,
|
||||
@@ -107,11 +107,12 @@ INNERTUBE_CLIENTS = {
|
||||
**WEB_PO_TOKEN_POLICIES,
|
||||
},
|
||||
# Safari UA returns pre-merged video+audio 144p/240p/360p/720p/1080p HLS formats
|
||||
# Since 2026.07, HLS formats are only returned with some logged-in or "trusted" sessions
|
||||
'web_safari': {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'WEB',
|
||||
'clientVersion': '2.20260114.08.00',
|
||||
'clientVersion': '2.20260708.00.00',
|
||||
'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15,gzip(gfe)',
|
||||
},
|
||||
},
|
||||
@@ -123,7 +124,7 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'WEB_EMBEDDED_PLAYER',
|
||||
'clientVersion': '1.20260115.01.00',
|
||||
'clientVersion': '2.20260708.00.00',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 56,
|
||||
@@ -134,7 +135,7 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'WEB_REMIX',
|
||||
'clientVersion': '1.20260114.03.00',
|
||||
'clientVersion': '1.20260707.12.00',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 67,
|
||||
@@ -164,7 +165,7 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'WEB_CREATOR',
|
||||
'clientVersion': '1.20260114.05.00',
|
||||
'clientVersion': '1.20260708.06.00',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 62,
|
||||
@@ -193,9 +194,9 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'ANDROID',
|
||||
'clientVersion': '21.02.35',
|
||||
'clientVersion': '21.26.364',
|
||||
'androidSdkVersion': 30,
|
||||
'userAgent': 'com.google.android.youtube/21.02.35 (Linux; U; Android 11) gzip',
|
||||
'userAgent': 'com.google.android.youtube/21.26.364 (Linux; U; Android 11) gzip',
|
||||
'osName': 'Android',
|
||||
'osVersion': '11',
|
||||
},
|
||||
@@ -223,6 +224,7 @@ INNERTUBE_CLIENTS = {
|
||||
},
|
||||
# "Made for kids" videos aren't available with this client
|
||||
# Using a clientVersion>1.65 may return SABR streams only
|
||||
# Since 2026.07, intermittent/selective POT enforcement has been observed for non-HLS formats
|
||||
'android_vr': {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
@@ -238,6 +240,24 @@ INNERTUBE_CLIENTS = {
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 28,
|
||||
'REQUIRE_JS_PLAYER': False,
|
||||
'GVS_PO_TOKEN_POLICY': {
|
||||
StreamingProtocol.HTTPS: GvsPoTokenPolicy(
|
||||
required=True,
|
||||
recommended=True,
|
||||
not_required_with_player_token=True,
|
||||
),
|
||||
StreamingProtocol.DASH: GvsPoTokenPolicy(
|
||||
required=True,
|
||||
recommended=True,
|
||||
not_required_with_player_token=True,
|
||||
),
|
||||
StreamingProtocol.HLS: GvsPoTokenPolicy(
|
||||
required=False,
|
||||
recommended=True,
|
||||
not_required_with_player_token=True,
|
||||
),
|
||||
},
|
||||
'PLAYER_PO_TOKEN_POLICY': PlayerPoTokenPolicy(required=False, recommended=True),
|
||||
},
|
||||
# iOS clients have HLS live streams. Setting device model to get 60fps formats.
|
||||
# See: https://github.com/TeamNewPipe/NewPipeExtractor/issues/680#issuecomment-1002724558
|
||||
@@ -245,10 +265,10 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'IOS',
|
||||
'clientVersion': '21.02.3',
|
||||
'clientVersion': '21.26.4',
|
||||
'deviceMake': 'Apple',
|
||||
'deviceModel': 'iPhone16,2',
|
||||
'userAgent': 'com.google.ios.youtube/21.02.3 (iPhone16,2; U; CPU iOS 18_3_2 like Mac OS X;)',
|
||||
'userAgent': 'com.google.ios.youtube/21.26.4 (iPhone16,2; U; CPU iOS 18_3_2 like Mac OS X;)',
|
||||
'osName': 'iPhone',
|
||||
'osVersion': '18.3.2.22D82',
|
||||
},
|
||||
@@ -270,13 +290,29 @@ INNERTUBE_CLIENTS = {
|
||||
'PLAYER_PO_TOKEN_POLICY': PlayerPoTokenPolicy(required=False, recommended=True),
|
||||
'REQUIRE_JS_PLAYER': False,
|
||||
},
|
||||
# "Made for kids" videos aren't available with this client
|
||||
'visionos': {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'VISIONOS',
|
||||
'clientVersion': '1.02',
|
||||
'deviceMake': 'Apple',
|
||||
'deviceModel': 'RealityDevice17,1',
|
||||
'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 15_7_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15',
|
||||
'osName': 'visionOS',
|
||||
'osVersion': '26.5.23O471',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 101,
|
||||
'REQUIRE_JS_PLAYER': False,
|
||||
},
|
||||
# mweb has 'ultralow' formats
|
||||
# See: https://github.com/yt-dlp/yt-dlp/pull/557
|
||||
'mweb': {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'MWEB',
|
||||
'clientVersion': '2.20260115.01.00',
|
||||
'clientVersion': '2.20260708.05.00',
|
||||
# mweb previously did not require PO Token with this UA
|
||||
'userAgent': 'Mozilla/5.0 (iPad; CPU OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1,gzip(gfe)',
|
||||
},
|
||||
@@ -307,7 +343,7 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'TVHTML5',
|
||||
'clientVersion': '7.20260114.12.00',
|
||||
'clientVersion': '7.20260707.07.00',
|
||||
# See: https://github.com/youtube/cobalt/blob/main/cobalt/browser/user_agent/user_agent_platform_info.cc#L506
|
||||
'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/25.lts.30.1034943-gold (unlike Gecko), Unknown_TV_Unknown_0/Unknown (Unknown, Unknown)',
|
||||
},
|
||||
@@ -319,12 +355,11 @@ INNERTUBE_CLIENTS = {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'TVHTML5',
|
||||
'clientVersion': '5.20260114',
|
||||
'clientVersion': '5.20260707',
|
||||
'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 7,
|
||||
'REQUIRE_AUTH': True,
|
||||
'SUPPORTS_COOKIES': True,
|
||||
},
|
||||
'tv_simply': {
|
||||
|
||||
+132
-133
@@ -28,7 +28,7 @@ from .jsc._director import initialize_jsc_director
|
||||
from .jsc.provider import JsChallengeRequest, JsChallengeType, NChallengeInput, SigChallengeInput
|
||||
from .pot._director import initialize_pot_director
|
||||
from .pot.provider import PoTokenContext, PoTokenRequest
|
||||
from ...networking.exceptions import HTTPError
|
||||
from ...networking import HEADRequest
|
||||
from ...utils import (
|
||||
NO_DEFAULT,
|
||||
ExtractorError,
|
||||
@@ -140,13 +140,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
_RETURN_TYPE = 'video' # XXX: How to handle multifeed?
|
||||
|
||||
_SUBTITLE_FORMATS = ('json3', 'srv1', 'srv2', 'srv3', 'ttml', 'srt', 'vtt')
|
||||
_DEFAULT_CLIENTS = ('android_vr', 'web_safari')
|
||||
_DEFAULT_JSLESS_CLIENTS = ('android_vr',)
|
||||
_DEFAULT_AUTHED_CLIENTS = ('tv_downgraded', 'web_safari')
|
||||
_DEFAULT_CLIENTS = ('visionos', 'android_vr', 'web')
|
||||
_DEFAULT_JSLESS_CLIENTS = ('visionos', 'android_vr')
|
||||
_DEFAULT_AUTHED_CLIENTS = ('tv_downgraded', 'web')
|
||||
# Premium does not require POT (except for subtitles)
|
||||
_DEFAULT_PREMIUM_CLIENTS = ('tv_downgraded', 'web_creator')
|
||||
_DEFAULT_PREMIUM_CLIENTS = ('tv_downgraded', 'web_creator', 'web')
|
||||
_WEBPAGE_CLIENTS = ('web', 'web_safari')
|
||||
_DEFAULT_WEBPAGE_CLIENT = 'web_safari'
|
||||
_DEFAULT_WEBPAGE_CLIENT = 'web'
|
||||
|
||||
_GEO_BYPASS = False
|
||||
|
||||
@@ -1600,13 +1600,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'info_dict': {
|
||||
'id': 'brhfDfLdDZ8',
|
||||
'ext': 'mp4',
|
||||
'title': 'This is the WORST Movie Science We\'ve Ever Seen',
|
||||
'title': 'Scientists React to Terrible Movie Science | Moonfall (2021)',
|
||||
'description': 'md5:8afd0a3cd69ec63438fc573580436f92',
|
||||
'media_type': 'video',
|
||||
'uploader': 'Open Sauce',
|
||||
'uploader_id': '@opensaucelive',
|
||||
'uploader_url': 'https://www.youtube.com/@opensaucelive',
|
||||
'channel': 'Open Sauce',
|
||||
'uploader': 'Sauce +',
|
||||
'uploader_id': '@sauceplusofficial',
|
||||
'uploader_url': 'https://www.youtube.com/@sauceplusofficial',
|
||||
'channel': 'Sauce +',
|
||||
'channel_id': 'UC2EiGVmCeD79l_vZ204DUSw',
|
||||
'channel_url': 'https://www.youtube.com/channel/UC2EiGVmCeD79l_vZ204DUSw',
|
||||
'comment_count': int,
|
||||
@@ -1614,15 +1614,17 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'like_count': int,
|
||||
'age_limit': 0,
|
||||
'duration': 1664,
|
||||
'thumbnail': 'https://i.ytimg.com/vi/brhfDfLdDZ8/hqdefault.jpg',
|
||||
'thumbnail': 'https://i.ytimg.com/vi/brhfDfLdDZ8/sddefault.jpg',
|
||||
'categories': ['Entertainment'],
|
||||
'tags': ['Moonfall', 'Bad Science', 'Open Sauce', 'Sauce+', 'The Backyard Scientist', 'William Osman', 'Allen Pan'],
|
||||
'creators': ['Open Sauce', 'William Osman 2'],
|
||||
'creators': ['Sauce +', 'William Osman 2'],
|
||||
'timestamp': 1759452918,
|
||||
'upload_date': '20251003',
|
||||
'playable_in_embed': True,
|
||||
'availability': 'public',
|
||||
'live_status': 'not_live',
|
||||
'channel_follower_count': int,
|
||||
'heatmap': 'count:100',
|
||||
},
|
||||
'params': {'skip_download': True},
|
||||
}, {
|
||||
@@ -1656,6 +1658,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'playable_in_embed': True,
|
||||
'availability': 'public',
|
||||
'live_status': 'not_live',
|
||||
'channel_follower_count': int,
|
||||
},
|
||||
'params': {'skip_download': True},
|
||||
}, {
|
||||
@@ -1940,6 +1943,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
lock = threading.Lock()
|
||||
start_time = time.time()
|
||||
formats = [f for f in formats if f.get('is_from_start')]
|
||||
adaptive_last_seq_cache = {}
|
||||
|
||||
def refetch_manifest(itag, client_name, delay):
|
||||
nonlocal formats, start_time, is_live
|
||||
@@ -1956,9 +1960,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
is_live = live_status == 'is_live'
|
||||
start_time = time.time()
|
||||
|
||||
def mpd_feed(itag, client_name, delay):
|
||||
def url_feed(itag, client_name, delay):
|
||||
"""
|
||||
@returns (manifest_url, manifest_stream_number, is_live) or None
|
||||
@returns (base_url, is_live) or None
|
||||
"""
|
||||
for retry in self.RetryManager(fatal=False):
|
||||
with lock:
|
||||
@@ -1969,33 +1973,39 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if not is_live:
|
||||
retry.error = f'{video_id}: Video is no longer live'
|
||||
else:
|
||||
retry.error = f'Cannot find refreshed manifest for format {itag}{bug_reports_message()}'
|
||||
retry.error = f'Cannot find refreshed url for format {itag}{bug_reports_message()}'
|
||||
continue
|
||||
|
||||
# Formats from ended premieres will be missing a manifest_url
|
||||
# See https://github.com/yt-dlp/yt-dlp/issues/8543
|
||||
if not f.get('manifest_url'):
|
||||
if not f.get('url'):
|
||||
break
|
||||
|
||||
return f['manifest_url'], f['manifest_stream_number'], is_live
|
||||
return f['url'], is_live
|
||||
return None
|
||||
|
||||
for f in formats:
|
||||
f['is_live'] = is_live
|
||||
gen = functools.partial(self._live_dash_fragments, video_id, f['_itag'], f['_client'],
|
||||
live_start_time, mpd_feed, not is_live and f.copy())
|
||||
gen = functools.partial(
|
||||
self._live_adaptive_fragments,
|
||||
video_id,
|
||||
f['_itag'],
|
||||
f['_client'],
|
||||
live_start_time,
|
||||
url_feed if is_live else None,
|
||||
f.get('url') if not is_live else None,
|
||||
f.get('target_duration'),
|
||||
adaptive_last_seq_cache,
|
||||
)
|
||||
if is_live:
|
||||
f['fragments'] = gen
|
||||
f['protocol'] = 'http_dash_segments_generator'
|
||||
else:
|
||||
f['fragments'] = LazyList(gen({}))
|
||||
f['protocol'] = 'http_dash_segments'
|
||||
del f['is_from_start']
|
||||
|
||||
def _live_dash_fragments(self, video_id, itag, client_name, live_start_time, mpd_feed, manifestless_orig_fmt, ctx):
|
||||
def _live_adaptive_fragments(self, video_id, itag, client_name, live_start_time, url_feed, base_url, fragment_duration, last_seq_cache, ctx):
|
||||
FETCH_SPAN, MAX_DURATION = 5, 432000
|
||||
|
||||
mpd_url, stream_number, is_live = None, None, True
|
||||
|
||||
begin_index = 0
|
||||
download_start_time = ctx.get('start') or time.time()
|
||||
|
||||
@@ -2006,98 +2016,77 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'YouTube does not have data before that. If you think this is wrong,'), only_once=True)
|
||||
lack_early_segments = True
|
||||
|
||||
known_idx, no_fragment_score, last_segment_url = begin_index, 0, None
|
||||
fragments, fragment_base_url = None, None
|
||||
|
||||
def _extract_sequence_from_mpd(refresh_sequence, immediate):
|
||||
nonlocal mpd_url, stream_number, is_live, no_fragment_score, fragments, fragment_base_url
|
||||
# Obtain from MPD's maximum seq value
|
||||
old_mpd_url = mpd_url
|
||||
last_error = ctx.pop('last_error', None)
|
||||
expire_fast = immediate or (last_error and isinstance(last_error, HTTPError) and last_error.status == 403)
|
||||
mpd_url, stream_number, is_live = (mpd_feed(itag, client_name, 5 if expire_fast else 18000)
|
||||
or (mpd_url, stream_number, False))
|
||||
if not refresh_sequence:
|
||||
if expire_fast and not is_live:
|
||||
return False, last_seq
|
||||
elif old_mpd_url == mpd_url:
|
||||
return True, last_seq
|
||||
if manifestless_orig_fmt:
|
||||
fmt_info = manifestless_orig_fmt
|
||||
else:
|
||||
try:
|
||||
fmts, _ = self._extract_mpd_formats_and_subtitles(
|
||||
mpd_url, None, note=False, errnote=False, fatal=False)
|
||||
except ExtractorError:
|
||||
fmts = None
|
||||
if not fmts:
|
||||
no_fragment_score += 2
|
||||
return False, last_seq
|
||||
fmt_info = next(x for x in fmts if x['manifest_stream_number'] == stream_number)
|
||||
fragments = fmt_info['fragments']
|
||||
fragment_base_url = fmt_info['fragment_base_url']
|
||||
assert fragment_base_url
|
||||
|
||||
_last_seq = int(re.search(r'(?:/|^)sq/(\d+)', fragments[-1]['path']).group(1))
|
||||
return True, _last_seq
|
||||
known_idx, no_fragment_score = begin_index, 0
|
||||
|
||||
self.write_debug(f'[{video_id}] Generating fragments for format {itag}')
|
||||
while is_live:
|
||||
should_iterate = True
|
||||
while should_iterate:
|
||||
fetch_time = time.time()
|
||||
if no_fragment_score > 30:
|
||||
return
|
||||
if last_segment_url:
|
||||
# Obtain from "X-Head-Seqnum" header value from each segment
|
||||
|
||||
if url_feed and (feed_results := url_feed(itag, client_name, 5 if no_fragment_score > 15 else 18000)):
|
||||
base_url, should_iterate = feed_results
|
||||
else:
|
||||
should_iterate = False
|
||||
if not base_url:
|
||||
no_fragment_score += 2
|
||||
continue
|
||||
|
||||
# Obtain from "X-Head-Seqnum" header value. The bare base URL
|
||||
# may return an empty response body, but the headers are still usable.
|
||||
cache_key = should_iterate, int(time.time() // FETCH_SPAN)
|
||||
if cache_key in last_seq_cache:
|
||||
last_seq = last_seq_cache[cache_key]
|
||||
else:
|
||||
try:
|
||||
urlh = self._request_webpage(
|
||||
last_segment_url, None, note=False, errnote=False, fatal=False)
|
||||
except ExtractorError:
|
||||
HEADRequest(base_url), None,
|
||||
note=False, errnote='Fragment request failed')
|
||||
except ExtractorError as e:
|
||||
self.write_debug(e.msg)
|
||||
urlh = None
|
||||
last_seq = try_get(urlh, lambda x: int_or_none(x.headers['X-Head-Seqnum']))
|
||||
if last_seq is None:
|
||||
no_fragment_score += 2
|
||||
last_segment_url = None
|
||||
continue
|
||||
else:
|
||||
should_continue, last_seq = _extract_sequence_from_mpd(True, no_fragment_score > 15)
|
||||
if urlh:
|
||||
urlh.close()
|
||||
if last_seq is not None:
|
||||
last_seq_cache.clear()
|
||||
last_seq_cache[cache_key] = last_seq
|
||||
if last_seq is None:
|
||||
no_fragment_score += 2
|
||||
if not should_continue:
|
||||
continue
|
||||
continue
|
||||
|
||||
if known_idx > last_seq:
|
||||
last_segment_url = None
|
||||
no_fragment_score += 5
|
||||
if should_iterate:
|
||||
time.sleep(max(0, FETCH_SPAN + fetch_time - time.time()))
|
||||
continue
|
||||
|
||||
last_seq += 1
|
||||
|
||||
if not url_feed:
|
||||
last_seq -= 2
|
||||
|
||||
if begin_index < 0 and known_idx < 0:
|
||||
# skip from the start when it's negative value
|
||||
known_idx = last_seq + begin_index
|
||||
if lack_early_segments:
|
||||
known_idx = max(known_idx, last_seq - int(MAX_DURATION // fragments[-1]['duration']))
|
||||
try:
|
||||
for idx in range(known_idx, last_seq):
|
||||
# do not update sequence here or you'll get skipped some part of it
|
||||
should_continue, _ = _extract_sequence_from_mpd(False, False)
|
||||
if not should_continue:
|
||||
known_idx = idx - 1
|
||||
raise ExtractorError('breaking out of outer loop')
|
||||
last_segment_url = urljoin(fragment_base_url, f'sq/{idx}')
|
||||
yield {
|
||||
'url': last_segment_url,
|
||||
'fragment_count': last_seq,
|
||||
}
|
||||
if known_idx == last_seq:
|
||||
no_fragment_score += 5
|
||||
else:
|
||||
no_fragment_score = 0
|
||||
known_idx = last_seq
|
||||
except ExtractorError:
|
||||
continue
|
||||
known_idx = max(known_idx, last_seq - int(MAX_DURATION // fragment_duration))
|
||||
|
||||
if manifestless_orig_fmt:
|
||||
# Stop at the first iteration if running for post-live manifestless;
|
||||
# fragment count no longer increase since it starts
|
||||
for idx in range(known_idx, last_seq):
|
||||
yield {
|
||||
'url': update_url_query(base_url, {'sq': str(idx)}),
|
||||
'fragment_count': last_seq,
|
||||
}
|
||||
|
||||
if known_idx == last_seq:
|
||||
no_fragment_score += 5
|
||||
else:
|
||||
no_fragment_score = 0
|
||||
known_idx = last_seq
|
||||
|
||||
if not url_feed:
|
||||
# Post-live: stop after first iteration
|
||||
break
|
||||
|
||||
time.sleep(max(0, FETCH_SPAN + fetch_time - time.time()))
|
||||
@@ -2918,6 +2907,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
def _is_unplayable(player_response):
|
||||
return traverse_obj(player_response, ('playabilityStatus', 'status')) == 'UNPLAYABLE'
|
||||
|
||||
@staticmethod
|
||||
def _is_error_response(player_response):
|
||||
return traverse_obj(player_response, ('playabilityStatus', 'status')) == 'ERROR'
|
||||
|
||||
def _extract_player_response(self, client, video_id, webpage_ytcfg, player_ytcfg, player_url, initial_pr, visitor_data, data_sync_id, po_token):
|
||||
headers = self.generate_api_headers(
|
||||
ytcfg=player_ytcfg,
|
||||
@@ -3150,13 +3143,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
prs.append(pr)
|
||||
|
||||
if (
|
||||
# Is this a "made for kids" video that can't be downloaded with android_vr?
|
||||
client == 'android_vr' and self._is_unplayable(pr)
|
||||
# Is this a "made for kids" video that can't be downloaded with android_vr/visionos?
|
||||
client in {'android_vr', 'visionos'}
|
||||
and (self._is_unplayable(pr) or self._is_error_response(pr))
|
||||
and webpage and 'made for kids' in webpage
|
||||
# ...and is a JS runtime is available?
|
||||
and any(p.is_available() for p in self._jsc_director.providers.values())
|
||||
):
|
||||
append_client('web_embedded')
|
||||
append_client('tv_downgraded')
|
||||
|
||||
# web_embedded can work around age-gate and age-verification for some embeddable videos
|
||||
if self._is_agegated(pr) and variant != 'web_embedded':
|
||||
@@ -3194,10 +3188,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
raise ExtractorError('Failed to extract any player response')
|
||||
return prs, player_url
|
||||
|
||||
def _needs_live_processing(self, live_status, duration):
|
||||
if ((live_status == 'is_live' and self.get_param('live_from_start'))
|
||||
or (live_status == 'post_live' and (duration or 0) > 2 * 3600)):
|
||||
return live_status
|
||||
def _needs_live_processing(self, live_status):
|
||||
return live_status == 'post_live' or (
|
||||
live_status == 'is_live' and self.get_param('live_from_start'))
|
||||
|
||||
def _report_pot_format_skipped(self, video_id, client_name, proto):
|
||||
msg = (
|
||||
@@ -3497,8 +3490,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
https_fmts = []
|
||||
|
||||
for fmt_stream in streaming_formats:
|
||||
# Live adaptive https formats are not supported: skip unless extractor-arg given
|
||||
if fmt_stream.get('targetDurationSec') and skip_bad_formats:
|
||||
if (
|
||||
# It's a live adaptive format
|
||||
fmt_stream.get('targetDurationSec')
|
||||
# The user didn't pass the formats=incomplete extractor-arg
|
||||
and skip_bad_formats
|
||||
# This is not a --live-from-start or post-live stream
|
||||
and not self._needs_live_processing(live_status)
|
||||
):
|
||||
continue
|
||||
|
||||
# FORMAT_STREAM_TYPE_OTF(otf=1) requires downloading the init fragment
|
||||
@@ -3593,6 +3592,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if live_status not in ('is_live', 'post_live'):
|
||||
fmt['available_at'] = available_at
|
||||
|
||||
if fmt_stream.get('targetDurationSec') and self._needs_live_processing(live_status):
|
||||
fmt['is_from_start'] = True
|
||||
fmt['target_duration'] = fmt_stream['targetDurationSec']
|
||||
fmt['_itag'] = stream_id[0]
|
||||
fmt['_client'] = client_name
|
||||
|
||||
https_fmts.append(fmt)
|
||||
|
||||
for fmt in https_fmts:
|
||||
@@ -3609,14 +3614,16 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
|
||||
yield from process_https_formats()
|
||||
|
||||
needs_live_processing = self._needs_live_processing(live_status, duration)
|
||||
needs_live_processing = self._needs_live_processing(live_status)
|
||||
|
||||
skip_manifests = set(self._configuration_arg('skip'))
|
||||
if (needs_live_processing == 'is_live' # These will be filtered out by YoutubeDL anyway
|
||||
or (needs_live_processing and skip_bad_formats)):
|
||||
if needs_live_processing and skip_bad_formats:
|
||||
skip_manifests.add('hls')
|
||||
|
||||
if skip_bad_formats and live_status == 'is_live' and needs_live_processing != 'is_live':
|
||||
if skip_bad_formats and (
|
||||
live_status == 'is_live'
|
||||
or (live_status == 'post_live' and (duration or 0) > 2 * 3600)
|
||||
):
|
||||
skip_manifests.add('dash')
|
||||
|
||||
def process_manifest_format(f, proto, client_name, itag, missing_pot):
|
||||
@@ -3754,10 +3761,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if process_manifest_format(f, 'dash', client_name, format_id, require_po_token and not po_token):
|
||||
f['filesize'] = int_or_none(self._search_regex(
|
||||
r'/clen/(\d+)', f.get('fragment_base_url') or f['url'], 'file size', default=None))
|
||||
if needs_live_processing:
|
||||
f['is_from_start'] = True
|
||||
f['_itag'] = format_id
|
||||
f['_client'] = client_name
|
||||
yield f
|
||||
yield subtitles
|
||||
|
||||
@@ -4129,7 +4132,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if not duration and live_end_time and live_start_time:
|
||||
duration = live_end_time - live_start_time
|
||||
|
||||
needs_live_processing = self._needs_live_processing(live_status, duration)
|
||||
needs_live_processing = self._needs_live_processing(live_status)
|
||||
|
||||
def adjust_incomplete_format(fmt, note_suffix='(Last 2 hours)', pref_adjustment=-10):
|
||||
fmt['preference'] = (fmt.get('preference') or -1) + pref_adjustment
|
||||
@@ -4138,26 +4141,19 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
# Adjust preference and format note for incomplete live/post-live formats
|
||||
if live_status in ('is_live', 'post_live'):
|
||||
for fmt in formats:
|
||||
protocol = fmt.get('protocol')
|
||||
# Currently, protocol isn't set for adaptive https formats, but this could change
|
||||
is_adaptive = protocol in (None, 'http', 'https')
|
||||
if live_status == 'post_live' and is_adaptive:
|
||||
# Post-live adaptive formats cause HttpFD to raise "Did not get any data blocks"
|
||||
# These formats are *only* useful to external applications, so we can hide them
|
||||
# Set their preference <= -1000 so that FormatSorter flags them as 'hidden'
|
||||
adjust_incomplete_format(fmt, note_suffix='(ended)', pref_adjustment=-5000)
|
||||
# Is it live with --live-from-start? Or is it post-live and its duration is >2hrs?
|
||||
elif needs_live_processing:
|
||||
# Is it live with --live-from-start or post-live?
|
||||
if needs_live_processing:
|
||||
if not fmt.get('is_from_start'):
|
||||
# Post-live m3u8 formats for >2hr streams
|
||||
# Post-live DASH and m3u8 manifests only have the last ~2 hours
|
||||
adjust_incomplete_format(fmt)
|
||||
elif live_status == 'is_live':
|
||||
if protocol == 'http_dash_segments':
|
||||
# Live DASH formats without --live-from-start
|
||||
adjust_incomplete_format(fmt)
|
||||
elif is_adaptive:
|
||||
# Incomplete live adaptive https formats
|
||||
protocol = fmt.get('protocol')
|
||||
# Currently, protocol isn't set for incomplete (non-generated) live adaptive formats
|
||||
if protocol in (None, 'http', 'https'):
|
||||
adjust_incomplete_format(fmt, note_suffix='(incomplete)', pref_adjustment=-20)
|
||||
# Live DASH formats (no longer properly supported)
|
||||
elif protocol == 'http_dash_segments':
|
||||
adjust_incomplete_format(fmt)
|
||||
|
||||
if needs_live_processing:
|
||||
self._prepare_live_from_start_formats(
|
||||
@@ -4475,13 +4471,16 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
vsir = get_first(contents, 'videoSecondaryInfoRenderer')
|
||||
if vsir:
|
||||
vor = traverse_obj(vsir, ('owner', 'videoOwnerRenderer'))
|
||||
collaborators = traverse_obj(vor, (
|
||||
collab_view_models = traverse_obj(vor, (
|
||||
'attributedTitle', 'commandRuns', ..., 'onTap', 'innertubeCommand', 'showDialogCommand',
|
||||
'panelLoadingStrategy', 'inlineContent', 'dialogViewModel', 'customContent', 'listViewModel',
|
||||
'listItems', ..., 'listItemViewModel', 'title', 'content', {str}))
|
||||
'listItems', ..., 'listItemViewModel', {dict}))
|
||||
collaborators = traverse_obj(collab_view_models, (..., 'title', 'content', {str}))
|
||||
info.update({
|
||||
'channel': self._get_text(vor, 'title') or (collaborators[0] if collaborators else None),
|
||||
'channel_follower_count': self._get_count(vor, 'subscriberCountText'),
|
||||
'channel_follower_count': (
|
||||
self._get_count(vor, 'subscriberCountText')
|
||||
or traverse_obj(collab_view_models, (0, 'rendererContext', 'accessibilityContext', 'label', {parse_count}))),
|
||||
'creators': collaborators if collaborators else None,
|
||||
})
|
||||
|
||||
|
||||
+2
-2
@@ -1139,12 +1139,12 @@ def create_parser():
|
||||
dest='external_downloader', metavar='[PROTO:]NAME', default={}, type='str',
|
||||
action='callback', callback=_dict_from_options_callback,
|
||||
callback_kwargs={
|
||||
'allowed_keys': 'http|ftp|m3u8|dash|rtsp|rtmp|mms',
|
||||
'allowed_keys': 'http|ftp|m3u8|dash|rtmp',
|
||||
'default_key': 'default',
|
||||
'process': str.strip,
|
||||
}, help=(
|
||||
'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. '
|
||||
'the protocols (http, ftp, m3u8, dash, rtmp) to use it for. '
|
||||
f'Currently supports native, {", ".join(sorted(list_external_downloaders()))}. '
|
||||
'You can use this option multiple times to set different downloaders for different protocols. '
|
||||
'E.g. --downloader aria2c --downloader "dash,m3u8:native" will use '
|
||||
|
||||
+1
-2
@@ -181,8 +181,7 @@ def _get_system_deprecation():
|
||||
# Do not inappropriately warn for unofficial/third-party binaries
|
||||
if not ORIGIN.startswith('yt-dlp/'):
|
||||
return None
|
||||
platform_name = platform.platform()
|
||||
if any(platform_name.startswith(f'Windows-{name}') for name in ('8', '2012Server')):
|
||||
if platform.platform().startswith(('Windows-8', 'Windows-2012Server')):
|
||||
return (
|
||||
'Support for Windows 8.x and Windows Server 2012 has been deprecated. '
|
||||
'See https://github.com/yt-dlp/yt-dlp/issues/16917 for details.\n'
|
||||
|
||||
+19
-7
@@ -2076,7 +2076,7 @@ def url_or_none(url):
|
||||
if not url or not isinstance(url, str):
|
||||
return None
|
||||
url = url.strip()
|
||||
return url if re.match(r'(?:(?:https?|rt(?:m(?:pt?[es]?|fp)|sp[su]?)|mms|ftps?|wss?):)?//', url) else None
|
||||
return url if re.match(r'(?:(?:https?|rtm(?:pt?[es]?|fp)|ftps?|wss?):)?//', url) else None
|
||||
|
||||
|
||||
def strftime_or_none(timestamp, date_format='%Y%m%d', default=None):
|
||||
@@ -3195,10 +3195,6 @@ def determine_protocol(info_dict):
|
||||
url = sanitize_url(info_dict['url'])
|
||||
if url.startswith('rtmp'):
|
||||
return 'rtmp'
|
||||
elif url.startswith('mms'):
|
||||
return 'mms'
|
||||
elif url.startswith('rtsp'):
|
||||
return 'rtsp'
|
||||
|
||||
ext = determine_ext(url)
|
||||
if ext == 'm3u8':
|
||||
@@ -4635,8 +4631,21 @@ LINK_TEMPLATES = {
|
||||
'webloc': DOT_WEBLOC_LINK_TEMPLATE,
|
||||
}
|
||||
|
||||
# Ref: https://specifications.freedesktop.org/desktop-entry/latest/value-types.html
|
||||
_DESKTOP_ENTRY_TRANS = str.maketrans({
|
||||
' ': R'\s',
|
||||
'\n': R'\n',
|
||||
'\t': R'\t',
|
||||
'\r': R'\r',
|
||||
'\\': R'\\',
|
||||
})
|
||||
|
||||
def iri_to_uri(iri):
|
||||
|
||||
def _desktop_entry_localestring(s):
|
||||
return s.translate(_DESKTOP_ENTRY_TRANS)
|
||||
|
||||
|
||||
def iri_to_uri(iri, *, allowed_schemes=('http', 'https')):
|
||||
"""
|
||||
Converts an IRI (Internationalized Resource Identifier, allowing Unicode characters) to a URI (Uniform Resource Identifier, ASCII-only).
|
||||
|
||||
@@ -4645,6 +4654,9 @@ def iri_to_uri(iri):
|
||||
|
||||
iri_parts = urllib.parse.urlparse(iri)
|
||||
|
||||
if iri_parts.scheme not in allowed_schemes:
|
||||
raise ValueError(f'"{iri_parts.scheme}" is not in allowed_schemes: {", ".join(allowed_schemes)}')
|
||||
|
||||
if '[' in iri_parts.netloc:
|
||||
raise ValueError('IPv6 URIs are not, yet, supported.')
|
||||
# Querying `.netloc`, when there's only one bracket, also raises a ValueError.
|
||||
@@ -5373,7 +5385,7 @@ class FormatSorter:
|
||||
'hdr': {'type': 'ordered', 'regex': True, 'field': 'dynamic_range',
|
||||
'order': ['dv', '(hdr)?12', r'(hdr)?10\+', '(hdr)?10', 'hlg', '', 'sdr', None]},
|
||||
'proto': {'type': 'ordered', 'regex': True, 'field': 'protocol',
|
||||
'order': ['(ht|f)tps', '(ht|f)tp$', 'm3u8.*', '.*dash', 'websocket_frag', 'rtmpe?', '', 'mms|rtsp', 'ws|websocket', 'f4']},
|
||||
'order': ['(ht|f)tps', '(ht|f)tp$', 'm3u8.*', '.*dash', 'websocket_frag', 'rtmpe?', '', 'ws|websocket', 'f4']},
|
||||
'vext': {'type': 'ordered', 'field': 'video_ext',
|
||||
'order': ('mp4', 'mov', 'webm', 'flv', '', 'none'),
|
||||
'order_free': ('webm', 'mp4', 'mov', 'flv', '', 'none')},
|
||||
|
||||
@@ -17,7 +17,7 @@ from .traversal import traverse_obj
|
||||
def random_user_agent():
|
||||
USER_AGENT_TMPL = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{}.0.0.0 Safari/537.36'
|
||||
# Target versions released within the last ~6 months
|
||||
CHROME_MAJOR_VERSION_RANGE = (144, 150)
|
||||
CHROME_MAJOR_VERSION_RANGE = (145, 151)
|
||||
return USER_AGENT_TMPL.format(random.randint(*CHROME_MAJOR_VERSION_RANGE))
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
# Autogenerated by devscripts/update-version.py
|
||||
|
||||
__version__ = '2026.06.09'
|
||||
__version__ = '2026.07.04'
|
||||
|
||||
RELEASE_GIT_HEAD = '821bef0f00178916d60dbc86bc0bcb8cc3bae8d5'
|
||||
RELEASE_GIT_HEAD = '997fa140840a08df3938b40da470c78049fef1f6'
|
||||
|
||||
VARIANT = None
|
||||
|
||||
@@ -12,4 +12,4 @@ CHANNEL = 'stable'
|
||||
|
||||
ORIGIN = 'yt-dlp/yt-dlp'
|
||||
|
||||
_pkg_version = '2026.06.09'
|
||||
_pkg_version = '2026.07.04'
|
||||
|
||||
Reference in New Issue
Block a user