mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-05-01 21:16:13 +00:00
Compare commits
4 Commits
1d1358d09f
...
e2a9cc7d13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2a9cc7d13 | ||
|
|
646bb31f39 | ||
|
|
1fbbe29b99 | ||
|
|
c105461647 |
10
CONTRIBUTORS
10
CONTRIBUTORS
@ -864,3 +864,13 @@ Sytm
|
||||
zahlman
|
||||
azdlonky
|
||||
thematuu
|
||||
beacdeac
|
||||
blauerdorf
|
||||
CanOfSocks
|
||||
gravesducking
|
||||
gseddon
|
||||
hunter-gatherer8
|
||||
LordMZTE
|
||||
regulad
|
||||
stastix
|
||||
syphyr
|
||||
|
||||
57
Changelog.md
57
Changelog.md
@ -4,6 +4,63 @@
|
||||
# To create a release, dispatch the https://github.com/yt-dlp/yt-dlp/actions/workflows/release.yml workflow on master
|
||||
-->
|
||||
|
||||
### 2026.02.21
|
||||
|
||||
#### Important changes
|
||||
- Security: [[CVE-2026-26331](https://nvd.nist.gov/vuln/detail/CVE-2026-26331)] [Arbitrary command injection with the `--netrc-cmd` option](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-g3gw-q23r-pgqm)
|
||||
- The argument passed to the command in `--netrc-cmd` is now limited to a safe subset of characters
|
||||
|
||||
#### Core changes
|
||||
- **cookies**: [Ignore cookies with control characters](https://github.com/yt-dlp/yt-dlp/commit/43229d1d5f47b313e1958d719faff6321d853ed3) ([#15862](https://github.com/yt-dlp/yt-dlp/issues/15862)) by [bashonly](https://github.com/bashonly), [syphyr](https://github.com/syphyr)
|
||||
- **jsinterp**
|
||||
- [Fix bitwise operations](https://github.com/yt-dlp/yt-dlp/commit/62574f5763755a8637880044630b12582e4a55a5) ([#15985](https://github.com/yt-dlp/yt-dlp/issues/15985)) by [bashonly](https://github.com/bashonly)
|
||||
- [Stringify bracket notation keys in object access](https://github.com/yt-dlp/yt-dlp/commit/c9c86519753d6cdafa052945d2de0d3fcd448927) ([#15989](https://github.com/yt-dlp/yt-dlp/issues/15989)) by [bashonly](https://github.com/bashonly)
|
||||
- [Support string concatenation with `+` and `+=`](https://github.com/yt-dlp/yt-dlp/commit/d108ca10b926410ed99031fec86894bfdea8f8eb) ([#15990](https://github.com/yt-dlp/yt-dlp/issues/15990)) by [bashonly](https://github.com/bashonly)
|
||||
|
||||
#### Extractor changes
|
||||
- [Add browser impersonation support to more extractors](https://github.com/yt-dlp/yt-dlp/commit/1d1358d09fedcdc6b3e83538a29b0b539cb9be3f) ([#16029](https://github.com/yt-dlp/yt-dlp/issues/16029)) by [bashonly](https://github.com/bashonly)
|
||||
- [Limit `netrc_machine` parameter to shell-safe characters](https://github.com/yt-dlp/yt-dlp/commit/1fbbe29b99dc61375bf6d786f824d9fcf6ea9c1a) by [Grub4K](https://github.com/Grub4K)
|
||||
- **1tv**: [Extract chapters](https://github.com/yt-dlp/yt-dlp/commit/23c059a455acbb317b2bbe657efd59113bf4d5ac) ([#15848](https://github.com/yt-dlp/yt-dlp/issues/15848)) by [hunter-gatherer8](https://github.com/hunter-gatherer8)
|
||||
- **aenetworks**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/24856538595a3b25c75e1199146fcc82ea812d97) ([#14959](https://github.com/yt-dlp/yt-dlp/issues/14959)) by [Sipherdrakon](https://github.com/Sipherdrakon)
|
||||
- **applepodcasts**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/1ea7329cc91da38a790174e831fffafcb3ea3c3d) ([#15901](https://github.com/yt-dlp/yt-dlp/issues/15901)) by [coreywright](https://github.com/coreywright)
|
||||
- **dailymotion**: [Fix extraction](https://github.com/yt-dlp/yt-dlp/commit/224fe478b0ef83d13b36924befa53686290cb000) ([#15995](https://github.com/yt-dlp/yt-dlp/issues/15995)) by [bashonly](https://github.com/bashonly)
|
||||
- **facebook**: ads: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/e2444584a3e590077b81828ad8a12fc4c3b1aa6d) ([#16002](https://github.com/yt-dlp/yt-dlp/issues/16002)) by [bashonly](https://github.com/bashonly)
|
||||
- **gem.cbc.ca**: [Support standalone, series & Olympics URLs](https://github.com/yt-dlp/yt-dlp/commit/637ae202aca7a990b3b61bc33d692870dc16c3ad) ([#15878](https://github.com/yt-dlp/yt-dlp/issues/15878)) by [0xvd](https://github.com/0xvd), [bashonly](https://github.com/bashonly), [makew0rld](https://github.com/makew0rld)
|
||||
- **learningonscreen**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/46d5b6f2b7989d8991a59215d434fb8b5a8ec7bb) ([#16028](https://github.com/yt-dlp/yt-dlp/issues/16028)) by [0xvd](https://github.com/0xvd), [bashonly](https://github.com/bashonly)
|
||||
- **locipo**: [Add extractors](https://github.com/yt-dlp/yt-dlp/commit/442c90da3ec680037b7d94abf91ec63b2e5a9ade) ([#15486](https://github.com/yt-dlp/yt-dlp/issues/15486)) by [doe1080](https://github.com/doe1080), [gravesducking](https://github.com/gravesducking)
|
||||
- **matchitv**: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/8d6e0b29bf15365638e0ceeb803a274e4db6157d) ([#15204](https://github.com/yt-dlp/yt-dlp/issues/15204)) by [gseddon](https://github.com/gseddon)
|
||||
- **odnoklassniki**: [Fix inefficient regular expression](https://github.com/yt-dlp/yt-dlp/commit/071ad7dfa012f5b71572d29ef96fc154cb2dc9cc) ([#15974](https://github.com/yt-dlp/yt-dlp/issues/15974)) by [bashonly](https://github.com/bashonly)
|
||||
- **opencast**: [Support `oc-p.uni-jena.de` URLs](https://github.com/yt-dlp/yt-dlp/commit/166356d1a1cac19cac14298e735eeae44b52c70e) ([#16026](https://github.com/yt-dlp/yt-dlp/issues/16026)) by [LordMZTE](https://github.com/LordMZTE)
|
||||
- **pornhub**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/6f38df31b477cf5ea3c8f91207452e3a4e8d5aa6) ([#15858](https://github.com/yt-dlp/yt-dlp/issues/15858)) by [beacdeac](https://github.com/beacdeac)
|
||||
- **saucepluschannel**: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/97f03660f55696dc9fce56e7ee43fbe3324a9867) ([#15830](https://github.com/yt-dlp/yt-dlp/issues/15830)) by [regulad](https://github.com/regulad)
|
||||
- **soundcloud**
|
||||
- [Fix client ID extraction](https://github.com/yt-dlp/yt-dlp/commit/81bdea03f3414dd4d086610c970ec14e15bd3d36) ([#16019](https://github.com/yt-dlp/yt-dlp/issues/16019)) by [bashonly](https://github.com/bashonly)
|
||||
- [Support browser impersonation](https://github.com/yt-dlp/yt-dlp/commit/f532a91cef11075eb5a7809255259b32d2bca8ca) ([#16020](https://github.com/yt-dlp/yt-dlp/issues/16020)) by [bashonly](https://github.com/bashonly)
|
||||
- **spankbang**
|
||||
- [Fix playlist title extraction](https://github.com/yt-dlp/yt-dlp/commit/1fe0bf23aa2249858c08408b7cc6287aaf528690) ([#14132](https://github.com/yt-dlp/yt-dlp/issues/14132)) by [blauerdorf](https://github.com/blauerdorf)
|
||||
- [Support browser impersonation](https://github.com/yt-dlp/yt-dlp/commit/f05e1cd1f1052cb40fc966d2fc175571986da863) ([#14130](https://github.com/yt-dlp/yt-dlp/issues/14130)) by [blauerdorf](https://github.com/blauerdorf)
|
||||
- **steam**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/1a9c4b8238434c760b3e27d0c9df6a4a2482d918) ([#15028](https://github.com/yt-dlp/yt-dlp/issues/15028)) by [doe1080](https://github.com/doe1080)
|
||||
- **tele5**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/772559e3db2eb82e5d862d6d779588ca4b0b048d) ([#16005](https://github.com/yt-dlp/yt-dlp/issues/16005)) by [bashonly](https://github.com/bashonly)
|
||||
- **tver**: olympic: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/02ce3efbfe51d54cb0866953af423fc6d1f38933) ([#15885](https://github.com/yt-dlp/yt-dlp/issues/15885)) by [doe1080](https://github.com/doe1080)
|
||||
- **tvo**: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/a13f281012a21c85f76cf3e320fc3b00d480d6c6) ([#15903](https://github.com/yt-dlp/yt-dlp/issues/15903)) by [doe1080](https://github.com/doe1080)
|
||||
- **twitter**: [Fix error handling](https://github.com/yt-dlp/yt-dlp/commit/0d8898c3f4e76742afb2b877f817fdee89fa1258) ([#15993](https://github.com/yt-dlp/yt-dlp/issues/15993)) by [bashonly](https://github.com/bashonly) (With fixes in [7722109](https://github.com/yt-dlp/yt-dlp/commit/77221098fc5016f12118421982f02b662021972c))
|
||||
- **visir**: [Add extractor](https://github.com/yt-dlp/yt-dlp/commit/c7c45f52890eee40565188aee874ff4e58e95c4f) ([#15811](https://github.com/yt-dlp/yt-dlp/issues/15811)) by [doe1080](https://github.com/doe1080)
|
||||
- **vk**: [Solve JS challenges using native JS interpreter](https://github.com/yt-dlp/yt-dlp/commit/acfc00a955208ee780b4cb18ae26de7b62444153) ([#15992](https://github.com/yt-dlp/yt-dlp/issues/15992)) by [0xvd](https://github.com/0xvd), [bashonly](https://github.com/bashonly)
|
||||
- **xhamster**: [Fix extractor](https://github.com/yt-dlp/yt-dlp/commit/133cb959be4d268e2cd6b3f1d9bf87fba4c3743e) ([#15831](https://github.com/yt-dlp/yt-dlp/issues/15831)) by [0xvd](https://github.com/0xvd)
|
||||
- **youtube**
|
||||
- [Add more known player JS variants](https://github.com/yt-dlp/yt-dlp/commit/2204cee6d8301e491d8455a2c54fd0e1b23468f5) ([#15975](https://github.com/yt-dlp/yt-dlp/issues/15975)) by [bashonly](https://github.com/bashonly)
|
||||
- [Extract live adaptive `incomplete` formats](https://github.com/yt-dlp/yt-dlp/commit/319a2bda83f5e54054661c56c1391533f82473c2) ([#15937](https://github.com/yt-dlp/yt-dlp/issues/15937)) by [bashonly](https://github.com/bashonly), [CanOfSocks](https://github.com/CanOfSocks)
|
||||
- [Update ejs to 0.5.0](https://github.com/yt-dlp/yt-dlp/commit/c105461647315f7f479091194944713b392ca729) ([#16031](https://github.com/yt-dlp/yt-dlp/issues/16031)) by [bashonly](https://github.com/bashonly)
|
||||
- date, search: [Remove broken `ytsearchdate` support](https://github.com/yt-dlp/yt-dlp/commit/c7945800e4ccd8cad2d5ee7806a872963c0c6d44) ([#15959](https://github.com/yt-dlp/yt-dlp/issues/15959)) by [stastix](https://github.com/stastix)
|
||||
|
||||
#### Networking changes
|
||||
- **Request Handler**: curl_cffi: [Deprioritize unreliable impersonate targets](https://github.com/yt-dlp/yt-dlp/commit/e74076141dc86d5603680ea641d7cec86a821ac8) ([#16018](https://github.com/yt-dlp/yt-dlp/issues/16018)) by [bashonly](https://github.com/bashonly)
|
||||
|
||||
#### Misc. changes
|
||||
- **cleanup**
|
||||
- [Bump ruff to 0.15.x](https://github.com/yt-dlp/yt-dlp/commit/abade83f8ddb63a11746b69038ebcd9c1405a00a) ([#15951](https://github.com/yt-dlp/yt-dlp/issues/15951)) by [Grub4K](https://github.com/Grub4K)
|
||||
- Miscellaneous: [646bb31](https://github.com/yt-dlp/yt-dlp/commit/646bb31f39614e6c2f7ba687c53e7496394cbadb) by [Grub4K](https://github.com/Grub4K)
|
||||
|
||||
### 2026.02.04
|
||||
|
||||
#### Extractor changes
|
||||
|
||||
6
Makefile
6
Makefile
@ -202,9 +202,9 @@ CONTRIBUTORS: Changelog.md
|
||||
|
||||
# The following EJS_-prefixed variables are auto-generated by devscripts/update_ejs.py
|
||||
# DO NOT EDIT!
|
||||
EJS_VERSION = 0.4.0
|
||||
EJS_WHEEL_NAME = yt_dlp_ejs-0.4.0-py3-none-any.whl
|
||||
EJS_WHEEL_HASH = sha256:19278cff397b243074df46342bb7616c404296aeaff01986b62b4e21823b0b9c
|
||||
EJS_VERSION = 0.5.0
|
||||
EJS_WHEEL_NAME = yt_dlp_ejs-0.5.0-py3-none-any.whl
|
||||
EJS_WHEEL_HASH = sha256:674fc0efea741d3100cdf3f0f9e123150715ee41edf47ea7a62fbdeda204bdec
|
||||
EJS_PY_FOLDERS = yt_dlp_ejs yt_dlp_ejs/yt yt_dlp_ejs/yt/solver
|
||||
EJS_PY_FILES = yt_dlp_ejs/__init__.py yt_dlp_ejs/_version.py yt_dlp_ejs/yt/__init__.py yt_dlp_ejs/yt/solver/__init__.py
|
||||
EJS_JS_FOLDERS = yt_dlp_ejs/yt/solver
|
||||
|
||||
@ -406,7 +406,7 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywords
|
||||
(default)
|
||||
--live-from-start Download livestreams from the start.
|
||||
Currently experimental and only supported
|
||||
for YouTube and Twitch
|
||||
for YouTube, Twitch, and TVer
|
||||
--no-live-from-start Download livestreams from the current time
|
||||
(default)
|
||||
--wait-for-video MIN[-MAX] Wait for scheduled streams to become
|
||||
|
||||
@ -337,5 +337,10 @@
|
||||
"when": "e2ea6bd6ab639f910b99e55add18856974ff4c3a",
|
||||
"short": "[ie] Fix prioritization of Youtube URL matching (#15596)",
|
||||
"authors": ["Grub4K"]
|
||||
},
|
||||
{
|
||||
"action": "add",
|
||||
"when": "1fbbe29b99dc61375bf6d786f824d9fcf6ea9c1a",
|
||||
"short": "[priority] Security: [[CVE-2026-26331](https://nvd.nist.gov/vuln/detail/CVE-2026-26331)] [Arbitrary command injection with the `--netrc-cmd` option](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-g3gw-q23r-pgqm)\n - The argument passed to the command in `--netrc-cmd` is now limited to a safe subset of characters"
|
||||
}
|
||||
]
|
||||
|
||||
@ -55,7 +55,7 @@ default = [
|
||||
"requests>=2.32.2,<3",
|
||||
"urllib3>=2.0.2,<3",
|
||||
"websockets>=13.0",
|
||||
"yt-dlp-ejs==0.4.0",
|
||||
"yt-dlp-ejs==0.5.0",
|
||||
]
|
||||
curl-cffi = [
|
||||
"curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.15; implementation_name=='cpython'",
|
||||
|
||||
@ -506,7 +506,8 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **GDCVault**: [*gdcvault*](## "netrc machine") (**Currently broken**)
|
||||
- **GediDigital**
|
||||
- **gem.cbc.ca**: [*cbcgem*](## "netrc machine")
|
||||
- **gem.cbc.ca:live**
|
||||
- **gem.cbc.ca:live**: [*cbcgem*](## "netrc machine")
|
||||
- **gem.cbc.ca:olympics**: [*cbcgem*](## "netrc machine")
|
||||
- **gem.cbc.ca:playlist**: [*cbcgem*](## "netrc machine")
|
||||
- **Genius**
|
||||
- **GeniusLyrics**
|
||||
@ -734,6 +735,8 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Livestreamfails**
|
||||
- **Lnk**
|
||||
- **loc**: Library of Congress
|
||||
- **Locipo**
|
||||
- **LocipoPlaylist**
|
||||
- **Loco**
|
||||
- **loom**
|
||||
- **loom:folder**: (**Currently broken**)
|
||||
@ -763,6 +766,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **MarkizaPage**: (**Currently broken**)
|
||||
- **massengeschmack.tv**
|
||||
- **Masters**
|
||||
- **MatchiTV**
|
||||
- **MatchTV**
|
||||
- **mave**
|
||||
- **mave:channel**
|
||||
@ -1283,6 +1287,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **Sangiin**: 参議院インターネット審議中継 (archive)
|
||||
- **Sapo**: SAPO Vídeos
|
||||
- **SaucePlus**: Sauce+
|
||||
- **SaucePlusChannel**
|
||||
- **SBS**: sbs.com.au
|
||||
- **sbs.co.kr**
|
||||
- **sbs.co.kr:allvod_program**
|
||||
@ -1550,10 +1555,12 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **TVC**
|
||||
- **TVCArticle**
|
||||
- **TVer**
|
||||
- **tver:olympic**
|
||||
- **tvigle**: Интернет-телевидение Tvigle.ru
|
||||
- **TVIPlayer**
|
||||
- **TVN24**: (**Currently broken**)
|
||||
- **tvnoe**: Televize Noe
|
||||
- **TVO**
|
||||
- **tvopengr:embed**: tvopen.gr embedded videos
|
||||
- **tvopengr:watch**: tvopen.gr (and ethnos.gr) videos
|
||||
- **tvp**: Telewizja Polska
|
||||
@ -1664,6 +1671,7 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **ViMP:Playlist**
|
||||
- **Viously**
|
||||
- **Viqeo**: (**Currently broken**)
|
||||
- **Visir**: Vísir
|
||||
- **Viu**
|
||||
- **viu:ott**: [*viu*](## "netrc machine")
|
||||
- **viu:playlist**
|
||||
@ -1812,7 +1820,6 @@ The only reliable way to check if a site is supported is to try it.
|
||||
- **youtube:playlist**: [*youtube*](## "netrc machine") YouTube playlists
|
||||
- **youtube:recommended**: [*youtube*](## "netrc machine") YouTube recommended videos; ":ytrec" keyword
|
||||
- **youtube:search**: [*youtube*](## "netrc machine") YouTube search; "ytsearch:" prefix
|
||||
- **youtube:search:date**: [*youtube*](## "netrc machine") YouTube search, newest videos first; "ytsearchdate:" prefix
|
||||
- **youtube:search_url**: [*youtube*](## "netrc machine") YouTube search URLs with sorting and filter support
|
||||
- **youtube:shorts:pivot:audio**: [*youtube*](## "netrc machine") YouTube Shorts audio pivot (Shorts using audio of a given video)
|
||||
- **youtube:subscriptions**: [*youtube*](## "netrc machine") YouTube subscriptions feed; ":ytsubs" keyword (requires cookies)
|
||||
|
||||
@ -76,6 +76,8 @@ class TestInfoExtractor(unittest.TestCase):
|
||||
self.assertEqual(ie._get_netrc_login_info(netrc_machine='empty_pass'), ('user', ''))
|
||||
self.assertEqual(ie._get_netrc_login_info(netrc_machine='both_empty'), ('', ''))
|
||||
self.assertEqual(ie._get_netrc_login_info(netrc_machine='nonexistent'), (None, None))
|
||||
with self.assertRaises(ExtractorError):
|
||||
ie._get_netrc_login_info(netrc_machine=';echo rce')
|
||||
|
||||
def test_html_search_regex(self):
|
||||
html = '<p id="foo">Watch this <a href="http://www.youtube.com/watch?v=BaW_jenozKc">video</a></p>'
|
||||
|
||||
@ -105,6 +105,66 @@ CHALLENGES: list[Challenge] = [
|
||||
'gN7a-hudCuAuPH6fByOk1_GNXN0yNMHShjZXS2VOgsEItAJz0tipeavEOmNdYN-wUtcEqD3bCXjc0iyKfAyZxCBGgIARwsSdQfJ2CJtt':
|
||||
'ttJC2JfQdSswRAIgGBCxZyAfKyi0cjXCb3DqEctUw-NYdNmOEvaepit0zJAtIEsgOV2SXZjhSHMNy0NXNGa1kOyBf6HPuAuCduh-_',
|
||||
}),
|
||||
# 4e51e895: main variant broke sig solving; n challenge is added only for regression testing
|
||||
Challenge('4e51e895', Variant.main, JsChallengeType.N, {
|
||||
'0eRGgQWJGfT5rFHFj': 't5kO23_msekBur',
|
||||
}),
|
||||
Challenge('4e51e895', Variant.main, JsChallengeType.SIG, {
|
||||
'AL6p_8AwdY9yAhRzK8rYA_9n97Kizf7_9n97Kizf7_9n97Kizf7_9n97Kizf7_9n97Kizf7_9n97Kizf7':
|
||||
'AwdY9yAhRzK8rYA_9n97Kizf7_9n97Kizf7_9n9pKizf7_9n97Kizf7_9n97Kizf7_9n97Kizf7',
|
||||
}),
|
||||
# 42c5570b: tce variant broke sig solving; n challenge is added only for regression testing
|
||||
Challenge('42c5570b', Variant.tce, JsChallengeType.N, {
|
||||
'ZdZIqFPQK-Ty8wId': 'CRoXjB-R-R',
|
||||
}),
|
||||
Challenge('42c5570b', Variant.tce, JsChallengeType.SIG, {
|
||||
'gN7a-hudCuAuPH6fByOk1_GNXN0yNMHShjZXS2VOgsEItAJz0tipeavEOmNdYN-wUtcEqD3bCXjc0iyKfAyZxCBGgIARwsSdQfJ2CJtt':
|
||||
'EN7a-hudCuAuPH6fByOk1_GNXN0yNMHShjZXS2VOgsEItAJz0tipeavcOmNdYN-wUtgEqD3bCXjc0iyKfAyZxCBGgIARwsSdQfJ2CJtt',
|
||||
}),
|
||||
# 54bd1de4: tce variant broke sig solving; n challenge is added only for regression testing
|
||||
Challenge('54bd1de4', Variant.tce, JsChallengeType.N, {
|
||||
'ZdZIqFPQK-Ty8wId': 'ka-slAQ31sijFN',
|
||||
}),
|
||||
Challenge('54bd1de4', Variant.tce, JsChallengeType.SIG, {
|
||||
'gN7a-hudCuAuPH6fByOk1_GNXN0yNMHShjZXS2VOgsEItAJz0tipeavEOmNdYN-wUtcEqD3bCXjc0iyKfAyZxCBGgIARwsSdQfJ2CJtt':
|
||||
'gN7a-hudCuAuPH6fByOk1_GNXN0yNMHShjZXS2VOgsEItAJz0titeavEOmNdYN-wUtcEqD3bCXjc0iyKfAyZxCBGgIARwsSdQfJ2CJtp',
|
||||
}),
|
||||
# 94667337: tce and es6 variants broke sig solving; n and main/tv variants are added only for regression testing
|
||||
Challenge('94667337', Variant.main, JsChallengeType.N, {
|
||||
'BQoJvGBkC2nj1ZZLK-': 'ib1ShEOGoFXIIw',
|
||||
}),
|
||||
Challenge('94667337', Variant.main, JsChallengeType.SIG, {
|
||||
'NJAJEij0EwRgIhAI0KExTgjfPk-MPM9MAdzyyPRt=BM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=gwzz':
|
||||
'AJEij0EwRgIhAI0KExTgjfPk-MPM9MNdzyyPRtzBM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=',
|
||||
}),
|
||||
Challenge('94667337', Variant.tv, JsChallengeType.N, {
|
||||
'BQoJvGBkC2nj1ZZLK-': 'ib1ShEOGoFXIIw',
|
||||
}),
|
||||
Challenge('94667337', Variant.tv, JsChallengeType.SIG, {
|
||||
'NJAJEij0EwRgIhAI0KExTgjfPk-MPM9MAdzyyPRt=BM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=gwzz':
|
||||
'AJEij0EwRgIhAI0KExTgjfPk-MPM9MNdzyyPRtzBM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=',
|
||||
}),
|
||||
Challenge('94667337', Variant.es6, JsChallengeType.N, {
|
||||
'BQoJvGBkC2nj1ZZLK-': 'ib1ShEOGoFXIIw',
|
||||
}),
|
||||
Challenge('94667337', Variant.es6, JsChallengeType.SIG, {
|
||||
'NJAJEij0EwRgIhAI0KExTgjfPk-MPM9MAdzyyPRt=BM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=gwzz':
|
||||
'AJEij0EwRgIhAI0KExTgjfPk-MPM9MNdzyyPRtzBM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=',
|
||||
}),
|
||||
Challenge('94667337', Variant.tce, JsChallengeType.N, {
|
||||
'BQoJvGBkC2nj1ZZLK-': 'ib1ShEOGoFXIIw',
|
||||
}),
|
||||
Challenge('94667337', Variant.tce, JsChallengeType.SIG, {
|
||||
'NJAJEij0EwRgIhAI0KExTgjfPk-MPM9MAdzyyPRt=BM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=gwzz':
|
||||
'AJEij0EwRgIhAI0KExTgjfPk-MPM9MNdzyyPRtzBM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=',
|
||||
}),
|
||||
Challenge('94667337', Variant.es6_tce, JsChallengeType.N, {
|
||||
'BQoJvGBkC2nj1ZZLK-': 'ib1ShEOGoFXIIw',
|
||||
}),
|
||||
Challenge('94667337', Variant.es6_tce, JsChallengeType.SIG, {
|
||||
'NJAJEij0EwRgIhAI0KExTgjfPk-MPM9MAdzyyPRt=BM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=gwzz':
|
||||
'AJEij0EwRgIhAI0KExTgjfPk-MPM9MNdzyyPRtzBM8-XO5tm5hlMCSVpAiEAv7eP3CURqZNSPow8BXXAoazVoXgeMP7gH9BdylHCwgw=',
|
||||
}),
|
||||
]
|
||||
|
||||
requests: list[JsChallengeRequest] = []
|
||||
|
||||
@ -661,9 +661,11 @@ class InfoExtractor:
|
||||
if not self._ready:
|
||||
self._initialize_pre_login()
|
||||
if self.supports_login():
|
||||
username, password = self._get_login_info()
|
||||
if username:
|
||||
self._perform_login(username, password)
|
||||
# try login only if it would actually do anything
|
||||
if type(self)._perform_login is not InfoExtractor._perform_login:
|
||||
username, password = self._get_login_info()
|
||||
if username:
|
||||
self._perform_login(username, password)
|
||||
elif self.get_param('username') and False not in (self.IE_DESC, self._NETRC_MACHINE):
|
||||
self.report_warning(f'Login with password is not supported for this website. {self._login_hint("cookies")}')
|
||||
self._real_initialize()
|
||||
@ -1385,6 +1387,11 @@ class InfoExtractor:
|
||||
|
||||
def _get_netrc_login_info(self, netrc_machine=None):
|
||||
netrc_machine = netrc_machine or self._NETRC_MACHINE
|
||||
if not netrc_machine:
|
||||
raise ExtractorError(f'Missing netrc_machine and {type(self).__name__}._NETRC_MACHINE')
|
||||
ALLOWED = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_'
|
||||
if netrc_machine.startswith(('-', '_')) or not all(c in ALLOWED for c in netrc_machine):
|
||||
raise ExtractorError(f'Invalid netrc machine: {netrc_machine!r}', expected=True)
|
||||
|
||||
cmd = self.get_param('netrc_cmd')
|
||||
if cmd:
|
||||
|
||||
@ -59,7 +59,7 @@ class GetCourseRuIE(InfoExtractor):
|
||||
'marafon.mani-beauty.com',
|
||||
'on.psbook.ru',
|
||||
]
|
||||
_BASE_URL_RE = rf'https?://(?:(?!player02\.)[^.]+\.getcourse\.(?:ru|io)|{"|".join(map(re.escape, _DOMAINS))})'
|
||||
_BASE_URL_RE = rf'https?://(?:(?!player02\.)[a-zA-Z0-9-]+\.getcourse\.(?:ru|io)|{"|".join(map(re.escape, _DOMAINS))})'
|
||||
_VALID_URL = [
|
||||
rf'{_BASE_URL_RE}/(?!pl/|teach/)(?P<id>[^?#]+)',
|
||||
rf'{_BASE_URL_RE}/(?:pl/)?teach/control/lesson/view\?(?:[^#]+&)?id=(?P<id>\d+)',
|
||||
|
||||
@ -128,7 +128,7 @@ class PornHubIE(PornHubBaseIE):
|
||||
_VALID_URL = rf'''(?x)
|
||||
https?://
|
||||
(?:
|
||||
(?:[^/]+\.)?
|
||||
(?:[a-zA-Z0-9.-]+\.)?
|
||||
{PornHubBaseIE._PORNHUB_HOST_RE}
|
||||
/(?:(?:view_video\.php|video/show)\?viewkey=|embed/)|
|
||||
(?:www\.)?thumbzilla\.com/video/
|
||||
@ -534,7 +534,7 @@ class PornHubPlaylistBaseIE(PornHubBaseIE):
|
||||
|
||||
|
||||
class PornHubUserIE(PornHubPlaylistBaseIE):
|
||||
_VALID_URL = rf'(?P<url>https?://(?:[^/]+\.)?{PornHubBaseIE._PORNHUB_HOST_RE}/(?:(?:user|channel)s|model|pornstar)/(?P<id>[^/?#&]+))(?:[?#&]|/(?!videos)|$)'
|
||||
_VALID_URL = rf'(?P<url>https?://(?:[a-zA-Z0-9.-]+\.)?{PornHubBaseIE._PORNHUB_HOST_RE}/(?:(?:user|channel)s|model|pornstar)/(?P<id>[^/?#&]+))(?:[?#&]|/(?!videos)|$)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.pornhub.com/model/zoe_ph',
|
||||
'playlist_mincount': 118,
|
||||
|
||||
@ -102,7 +102,7 @@ class TeachableIE(TeachableBaseIE):
|
||||
_WORKING = False
|
||||
_VALID_URL = r'''(?x)
|
||||
(?:
|
||||
{}https?://(?P<site_t>[^/]+)|
|
||||
{}https?://(?P<site_t>[a-zA-Z0-9.-]+)|
|
||||
https?://(?:www\.)?(?P<site>{})
|
||||
)
|
||||
/courses/[^/]+/lectures/(?P<id>\d+)
|
||||
@ -211,7 +211,7 @@ class TeachableIE(TeachableBaseIE):
|
||||
class TeachableCourseIE(TeachableBaseIE):
|
||||
_VALID_URL = r'''(?x)
|
||||
(?:
|
||||
{}https?://(?P<site_t>[^/]+)|
|
||||
{}https?://(?P<site_t>[a-zA-Z0-9.-]+)|
|
||||
https?://(?:www\.)?(?P<site>{})
|
||||
)
|
||||
/(?:courses|p)/(?:enrolled/)?(?P<id>[^/?#&]+)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# This file is generated by devscripts/update_ejs.py. DO NOT MODIFY!
|
||||
|
||||
VERSION = '0.4.0'
|
||||
VERSION = '0.5.0'
|
||||
HASHES = {
|
||||
'yt.solver.bun.lib.js': '6ff45e94de9f0ea936a183c48173cfa9ce526ee4b7544cd556428427c1dd53c8073ef0174e79b320252bf0e7c64b0032cc1cf9c4358f3fda59033b7caa01c241',
|
||||
'yt.solver.core.js': '05964b458d92a65d4fb7a90bcb5921c9fed2370f4e4f2f25badb41f28aff9069e0b3c4e5bf1baf2d3021787b67fc6093cefa44de30cffdc6f9fb25532484003b',
|
||||
'yt.solver.core.min.js': '0cd3c0b37e095d3cca99443b58fe03980ac3bf2e777c2485c23e1f6052b5ede9f07c7f1c79a9c3af3258ea91a228f099741e7eb07b53125b5dcc84bb4c0054f3',
|
||||
'yt.solver.core.js': '9742868113d7b0c29e24a95c8eb2c2bec7cdf95513dc7f55f523ba053c0ecf2af7dcb0138b1d933578304f0dda633a6b3bfff64e912b4c547b99dad083428c4b',
|
||||
'yt.solver.core.min.js': 'aee8c3354cfd535809c871c2a517d03231f89cd184e903af82ee274bcc2e90991ef19cb3f65f2ccc858c4963856ea87f8692fe16d71209f4fc7f41c44b828e36',
|
||||
'yt.solver.deno.lib.js': '9c8ee3ab6c23e443a5a951e3ac73c6b8c1c8fb34335e7058a07bf99d349be5573611de00536dcd03ecd3cf34014c4e9b536081de37af3637c5390c6a6fd6a0f0',
|
||||
'yt.solver.lib.js': '1ee3753a8222fc855f5c39db30a9ccbb7967dbe1fb810e86dc9a89aa073a0907f294c720e9b65427d560a35aa1ce6af19ef854d9126a05ca00afe03f72047733',
|
||||
'yt.solver.lib.min.js': '8420c259ad16e99ce004e4651ac1bcabb53b4457bf5668a97a9359be9a998a789fee8ab124ee17f91a2ea8fd84e0f2b2fc8eabcaf0b16a186ba734cf422ad053',
|
||||
|
||||
@ -60,26 +60,29 @@ var jsc = (function (meriyah, astring) {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
const nsigExpression = {
|
||||
type: 'VariableDeclaration',
|
||||
kind: 'var',
|
||||
declarations: [
|
||||
const nsig = {
|
||||
type: 'CallExpression',
|
||||
callee: { or: [{ type: 'Identifier' }, { type: 'SequenceExpression' }] },
|
||||
arguments: [
|
||||
{},
|
||||
{
|
||||
type: 'VariableDeclarator',
|
||||
init: {
|
||||
type: 'CallExpression',
|
||||
callee: { type: 'Identifier' },
|
||||
arguments: [
|
||||
{ type: 'Literal' },
|
||||
{
|
||||
type: 'CallExpression',
|
||||
callee: { type: 'Identifier', name: 'decodeURIComponent' },
|
||||
},
|
||||
],
|
||||
},
|
||||
type: 'CallExpression',
|
||||
callee: { type: 'Identifier', name: 'decodeURIComponent' },
|
||||
arguments: [{}],
|
||||
},
|
||||
],
|
||||
};
|
||||
const nsigAssignment = {
|
||||
type: 'AssignmentExpression',
|
||||
left: { type: 'Identifier' },
|
||||
operator: '=',
|
||||
right: nsig,
|
||||
};
|
||||
const nsigDeclarator = {
|
||||
type: 'VariableDeclarator',
|
||||
id: { type: 'Identifier' },
|
||||
init: nsig,
|
||||
};
|
||||
const logicalExpression = {
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
@ -97,6 +100,17 @@ var jsc = (function (meriyah, astring) {
|
||||
callee: { type: 'Identifier' },
|
||||
arguments: {
|
||||
or: [
|
||||
[
|
||||
{
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
name: 'decodeURIComponent',
|
||||
},
|
||||
arguments: [{ type: 'Identifier' }],
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
{ type: 'Literal' },
|
||||
{
|
||||
@ -110,6 +124,8 @@ var jsc = (function (meriyah, astring) {
|
||||
},
|
||||
],
|
||||
[
|
||||
{ type: 'Literal' },
|
||||
{ type: 'Literal' },
|
||||
{
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
@ -138,18 +154,18 @@ var jsc = (function (meriyah, astring) {
|
||||
expression: {
|
||||
type: 'AssignmentExpression',
|
||||
operator: '=',
|
||||
left: { type: 'Identifier' },
|
||||
right: { type: 'FunctionExpression', params: [{}, {}, {}] },
|
||||
left: { or: [{ type: 'Identifier' }, { type: 'MemberExpression' }] },
|
||||
right: { type: 'FunctionExpression' },
|
||||
},
|
||||
},
|
||||
{ type: 'FunctionDeclaration', params: [{}, {}, {}] },
|
||||
{ type: 'FunctionDeclaration' },
|
||||
{
|
||||
type: 'VariableDeclaration',
|
||||
declarations: {
|
||||
anykey: [
|
||||
{
|
||||
type: 'VariableDeclarator',
|
||||
init: { type: 'FunctionExpression', params: [{}, {}, {}] },
|
||||
init: { type: 'FunctionExpression' },
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -157,124 +173,150 @@ var jsc = (function (meriyah, astring) {
|
||||
],
|
||||
};
|
||||
function extract$1(node) {
|
||||
if (!matchesStructure(node, identifier$1)) {
|
||||
return null;
|
||||
}
|
||||
let block;
|
||||
if (
|
||||
const blocks = [];
|
||||
if (matchesStructure(node, identifier$1)) {
|
||||
if (
|
||||
node.type === 'ExpressionStatement' &&
|
||||
node.expression.type === 'AssignmentExpression' &&
|
||||
node.expression.right.type === 'FunctionExpression' &&
|
||||
node.expression.right.params.length >= 3
|
||||
) {
|
||||
blocks.push(node.expression.right.body);
|
||||
} else if (node.type === 'VariableDeclaration') {
|
||||
for (const decl of node.declarations) {
|
||||
if (
|
||||
_optionalChain$2([
|
||||
decl,
|
||||
'access',
|
||||
(_) => _.init,
|
||||
'optionalAccess',
|
||||
(_2) => _2.type,
|
||||
]) === 'FunctionExpression' &&
|
||||
decl.init.params.length >= 3
|
||||
) {
|
||||
blocks.push(decl.init.body);
|
||||
}
|
||||
}
|
||||
} else if (
|
||||
node.type === 'FunctionDeclaration' &&
|
||||
node.params.length >= 3
|
||||
) {
|
||||
blocks.push(node.body);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (
|
||||
node.type === 'ExpressionStatement' &&
|
||||
node.expression.type === 'AssignmentExpression' &&
|
||||
node.expression.right.type === 'FunctionExpression'
|
||||
node.expression.type === 'SequenceExpression'
|
||||
) {
|
||||
block = node.expression.right.body;
|
||||
} else if (node.type === 'VariableDeclaration') {
|
||||
for (const decl of node.declarations) {
|
||||
for (const expr of node.expression.expressions) {
|
||||
if (
|
||||
decl.type === 'VariableDeclarator' &&
|
||||
_optionalChain$2([
|
||||
decl,
|
||||
'access',
|
||||
(_) => _.init,
|
||||
'optionalAccess',
|
||||
(_2) => _2.type,
|
||||
]) === 'FunctionExpression' &&
|
||||
_optionalChain$2([
|
||||
decl,
|
||||
'access',
|
||||
(_3) => _3.init,
|
||||
'optionalAccess',
|
||||
(_4) => _4.params,
|
||||
'access',
|
||||
(_5) => _5.length,
|
||||
]) === 3
|
||||
expr.type === 'AssignmentExpression' &&
|
||||
expr.right.type === 'FunctionExpression' &&
|
||||
expr.right.params.length === 3
|
||||
) {
|
||||
block = decl.init.body;
|
||||
break;
|
||||
blocks.push(expr.right.body);
|
||||
}
|
||||
}
|
||||
} else if (node.type === 'FunctionDeclaration') {
|
||||
block = node.body;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
const relevantExpression = _optionalChain$2([
|
||||
block,
|
||||
'optionalAccess',
|
||||
(_6) => _6.body,
|
||||
'access',
|
||||
(_7) => _7.at,
|
||||
'call',
|
||||
(_8) => _8(-2),
|
||||
]);
|
||||
let call = null;
|
||||
if (matchesStructure(relevantExpression, logicalExpression)) {
|
||||
if (
|
||||
_optionalChain$2([
|
||||
relevantExpression,
|
||||
'optionalAccess',
|
||||
(_9) => _9.type,
|
||||
]) !== 'ExpressionStatement' ||
|
||||
relevantExpression.expression.type !== 'LogicalExpression' ||
|
||||
relevantExpression.expression.right.type !== 'SequenceExpression' ||
|
||||
relevantExpression.expression.right.expressions[0].type !==
|
||||
'AssignmentExpression' ||
|
||||
relevantExpression.expression.right.expressions[0].right.type !==
|
||||
'CallExpression'
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
call = relevantExpression.expression.right.expressions[0].right;
|
||||
} else if (
|
||||
_optionalChain$2([
|
||||
relevantExpression,
|
||||
'optionalAccess',
|
||||
(_10) => _10.type,
|
||||
]) === 'IfStatement' &&
|
||||
relevantExpression.consequent.type === 'BlockStatement'
|
||||
) {
|
||||
for (const n of relevantExpression.consequent.body) {
|
||||
if (!matchesStructure(n, nsigExpression)) {
|
||||
continue;
|
||||
for (const block of blocks) {
|
||||
let call = null;
|
||||
for (const stmt of block.body) {
|
||||
if (matchesStructure(stmt, logicalExpression)) {
|
||||
if (
|
||||
stmt.type === 'ExpressionStatement' &&
|
||||
stmt.expression.type === 'LogicalExpression' &&
|
||||
stmt.expression.right.type === 'SequenceExpression' &&
|
||||
stmt.expression.right.expressions[0].type ===
|
||||
'AssignmentExpression' &&
|
||||
stmt.expression.right.expressions[0].right.type === 'CallExpression'
|
||||
) {
|
||||
call = stmt.expression.right.expressions[0].right;
|
||||
}
|
||||
} else if (stmt.type === 'IfStatement') {
|
||||
let consequent = stmt.consequent;
|
||||
while (consequent.type === 'LabeledStatement') {
|
||||
consequent = consequent.body;
|
||||
}
|
||||
if (consequent.type !== 'BlockStatement') {
|
||||
continue;
|
||||
}
|
||||
for (const n of consequent.body) {
|
||||
if (n.type !== 'VariableDeclaration') {
|
||||
continue;
|
||||
}
|
||||
for (const decl of n.declarations) {
|
||||
if (
|
||||
matchesStructure(decl, nsigDeclarator) &&
|
||||
_optionalChain$2([
|
||||
decl,
|
||||
'access',
|
||||
(_3) => _3.init,
|
||||
'optionalAccess',
|
||||
(_4) => _4.type,
|
||||
]) === 'CallExpression'
|
||||
) {
|
||||
call = decl.init;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (call) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (stmt.type === 'ExpressionStatement') {
|
||||
if (
|
||||
stmt.expression.type !== 'LogicalExpression' ||
|
||||
stmt.expression.operator !== '&&' ||
|
||||
stmt.expression.right.type !== 'SequenceExpression'
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
for (const expr of stmt.expression.right.expressions) {
|
||||
if (matchesStructure(expr, nsigAssignment) && expr.type) {
|
||||
if (
|
||||
expr.type === 'AssignmentExpression' &&
|
||||
expr.right.type === 'CallExpression'
|
||||
) {
|
||||
call = expr.right;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
n.type !== 'VariableDeclaration' ||
|
||||
_optionalChain$2([
|
||||
n,
|
||||
'access',
|
||||
(_11) => _11.declarations,
|
||||
'access',
|
||||
(_12) => _12[0],
|
||||
'access',
|
||||
(_13) => _13.init,
|
||||
'optionalAccess',
|
||||
(_14) => _14.type,
|
||||
]) !== 'CallExpression'
|
||||
) {
|
||||
continue;
|
||||
if (call) {
|
||||
break;
|
||||
}
|
||||
call = n.declarations[0].init;
|
||||
break;
|
||||
}
|
||||
if (!call) {
|
||||
continue;
|
||||
}
|
||||
return {
|
||||
type: 'ArrowFunctionExpression',
|
||||
params: [{ type: 'Identifier', name: 'sig' }],
|
||||
body: {
|
||||
type: 'CallExpression',
|
||||
callee: call.callee,
|
||||
arguments: call.arguments.map((arg) => {
|
||||
if (
|
||||
arg.type === 'CallExpression' &&
|
||||
arg.callee.type === 'Identifier' &&
|
||||
arg.callee.name === 'decodeURIComponent'
|
||||
) {
|
||||
return { type: 'Identifier', name: 'sig' };
|
||||
}
|
||||
return arg;
|
||||
}),
|
||||
optional: false,
|
||||
},
|
||||
async: false,
|
||||
expression: false,
|
||||
generator: false,
|
||||
};
|
||||
}
|
||||
if (call === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
type: 'ArrowFunctionExpression',
|
||||
params: [{ type: 'Identifier', name: 'sig' }],
|
||||
body: {
|
||||
type: 'CallExpression',
|
||||
callee: { type: 'Identifier', name: call.callee.name },
|
||||
arguments:
|
||||
call.arguments.length === 1
|
||||
? [{ type: 'Identifier', name: 'sig' }]
|
||||
: [call.arguments[0], { type: 'Identifier', name: 'sig' }],
|
||||
optional: false,
|
||||
},
|
||||
async: false,
|
||||
expression: false,
|
||||
generator: false,
|
||||
};
|
||||
return null;
|
||||
}
|
||||
function _optionalChain$1(ops) {
|
||||
let lastAccessLHS = undefined;
|
||||
@ -472,8 +514,31 @@ var jsc = (function (meriyah, astring) {
|
||||
return value;
|
||||
}
|
||||
function preprocessPlayer(data) {
|
||||
const ast = meriyah.parse(data);
|
||||
const body = ast.body;
|
||||
const program = meriyah.parse(data);
|
||||
const plainStatements = modifyPlayer(program);
|
||||
const solutions = getSolutions(plainStatements);
|
||||
for (const [name, options] of Object.entries(solutions)) {
|
||||
plainStatements.push({
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
type: 'AssignmentExpression',
|
||||
operator: '=',
|
||||
left: {
|
||||
type: 'MemberExpression',
|
||||
computed: false,
|
||||
object: { type: 'Identifier', name: '_result' },
|
||||
property: { type: 'Identifier', name: name },
|
||||
optional: false,
|
||||
},
|
||||
right: multiTry(options),
|
||||
},
|
||||
});
|
||||
}
|
||||
program.body.splice(0, 0, ...setupNodes);
|
||||
return astring.generate(program);
|
||||
}
|
||||
function modifyPlayer(program) {
|
||||
const body = program.body;
|
||||
const block = (() => {
|
||||
switch (body.length) {
|
||||
case 1: {
|
||||
@ -506,16 +571,7 @@ var jsc = (function (meriyah, astring) {
|
||||
}
|
||||
throw 'unexpected structure';
|
||||
})();
|
||||
const found = { n: [], sig: [] };
|
||||
const plainExpressions = block.body.filter((node) => {
|
||||
const n = extract(node);
|
||||
if (n) {
|
||||
found.n.push(n);
|
||||
}
|
||||
const sig = extract$1(node);
|
||||
if (sig) {
|
||||
found.sig.push(sig);
|
||||
}
|
||||
block.body = block.body.filter((node) => {
|
||||
if (node.type === 'ExpressionStatement') {
|
||||
if (node.expression.type === 'AssignmentExpression') {
|
||||
return true;
|
||||
@ -524,41 +580,241 @@ var jsc = (function (meriyah, astring) {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
block.body = plainExpressions;
|
||||
for (const [name, options] of Object.entries(found)) {
|
||||
const unique = new Set(options.map((x) => JSON.stringify(x)));
|
||||
if (unique.size !== 1) {
|
||||
const message = `found ${unique.size} ${name} function possibilities`;
|
||||
throw (
|
||||
message +
|
||||
(unique.size
|
||||
? `: ${options.map((x) => astring.generate(x)).join(', ')}`
|
||||
: '')
|
||||
);
|
||||
return block.body;
|
||||
}
|
||||
function getSolutions(statements) {
|
||||
const found = { n: [], sig: [] };
|
||||
for (const statement of statements) {
|
||||
const n = extract(statement);
|
||||
if (n) {
|
||||
found.n.push(n);
|
||||
}
|
||||
const sig = extract$1(statement);
|
||||
if (sig) {
|
||||
found.sig.push(sig);
|
||||
}
|
||||
plainExpressions.push({
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
type: 'AssignmentExpression',
|
||||
operator: '=',
|
||||
left: {
|
||||
type: 'MemberExpression',
|
||||
computed: false,
|
||||
object: { type: 'Identifier', name: '_result' },
|
||||
property: { type: 'Identifier', name: name },
|
||||
},
|
||||
right: options[0],
|
||||
},
|
||||
});
|
||||
}
|
||||
ast.body.splice(0, 0, ...setupNodes);
|
||||
return astring.generate(ast);
|
||||
return found;
|
||||
}
|
||||
function getFromPrepared(code) {
|
||||
const resultObj = { n: null, sig: null };
|
||||
Function('_result', code)(resultObj);
|
||||
return resultObj;
|
||||
}
|
||||
function multiTry(generators) {
|
||||
return {
|
||||
type: 'ArrowFunctionExpression',
|
||||
params: [{ type: 'Identifier', name: '_input' }],
|
||||
body: {
|
||||
type: 'BlockStatement',
|
||||
body: [
|
||||
{
|
||||
type: 'VariableDeclaration',
|
||||
kind: 'const',
|
||||
declarations: [
|
||||
{
|
||||
type: 'VariableDeclarator',
|
||||
id: { type: 'Identifier', name: '_results' },
|
||||
init: {
|
||||
type: 'NewExpression',
|
||||
callee: { type: 'Identifier', name: 'Set' },
|
||||
arguments: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'ForOfStatement',
|
||||
left: {
|
||||
type: 'VariableDeclaration',
|
||||
kind: 'const',
|
||||
declarations: [
|
||||
{
|
||||
type: 'VariableDeclarator',
|
||||
id: { type: 'Identifier', name: '_generator' },
|
||||
init: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
right: { type: 'ArrayExpression', elements: generators },
|
||||
body: {
|
||||
type: 'BlockStatement',
|
||||
body: [
|
||||
{
|
||||
type: 'TryStatement',
|
||||
block: {
|
||||
type: 'BlockStatement',
|
||||
body: [
|
||||
{
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'MemberExpression',
|
||||
object: { type: 'Identifier', name: '_results' },
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'add' },
|
||||
optional: false,
|
||||
},
|
||||
arguments: [
|
||||
{
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
name: '_generator',
|
||||
},
|
||||
arguments: [
|
||||
{ type: 'Identifier', name: '_input' },
|
||||
],
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
optional: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
handler: {
|
||||
type: 'CatchClause',
|
||||
param: null,
|
||||
body: { type: 'BlockStatement', body: [] },
|
||||
},
|
||||
finalizer: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
await: false,
|
||||
},
|
||||
{
|
||||
type: 'IfStatement',
|
||||
test: {
|
||||
type: 'UnaryExpression',
|
||||
operator: '!',
|
||||
argument: {
|
||||
type: 'MemberExpression',
|
||||
object: { type: 'Identifier', name: '_results' },
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'size' },
|
||||
optional: false,
|
||||
},
|
||||
prefix: true,
|
||||
},
|
||||
consequent: {
|
||||
type: 'BlockStatement',
|
||||
body: [
|
||||
{
|
||||
type: 'ThrowStatement',
|
||||
argument: {
|
||||
type: 'TemplateLiteral',
|
||||
expressions: [],
|
||||
quasis: [
|
||||
{
|
||||
type: 'TemplateElement',
|
||||
value: { cooked: 'no solutions', raw: 'no solutions' },
|
||||
tail: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
alternate: null,
|
||||
},
|
||||
{
|
||||
type: 'IfStatement',
|
||||
test: {
|
||||
type: 'BinaryExpression',
|
||||
left: {
|
||||
type: 'MemberExpression',
|
||||
object: { type: 'Identifier', name: '_results' },
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'size' },
|
||||
optional: false,
|
||||
},
|
||||
right: { type: 'Literal', value: 1 },
|
||||
operator: '!==',
|
||||
},
|
||||
consequent: {
|
||||
type: 'BlockStatement',
|
||||
body: [
|
||||
{
|
||||
type: 'ThrowStatement',
|
||||
argument: {
|
||||
type: 'TemplateLiteral',
|
||||
expressions: [
|
||||
{
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'MemberExpression',
|
||||
object: { type: 'Identifier', name: '_results' },
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'join' },
|
||||
optional: false,
|
||||
},
|
||||
arguments: [{ type: 'Literal', value: ', ' }],
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
quasis: [
|
||||
{
|
||||
type: 'TemplateElement',
|
||||
value: {
|
||||
cooked: 'invalid solutions: ',
|
||||
raw: 'invalid solutions: ',
|
||||
},
|
||||
tail: false,
|
||||
},
|
||||
{
|
||||
type: 'TemplateElement',
|
||||
value: { cooked: '', raw: '' },
|
||||
tail: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
alternate: null,
|
||||
},
|
||||
{
|
||||
type: 'ReturnStatement',
|
||||
argument: {
|
||||
type: 'MemberExpression',
|
||||
object: {
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'MemberExpression',
|
||||
object: {
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'MemberExpression',
|
||||
object: { type: 'Identifier', name: '_results' },
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'values' },
|
||||
optional: false,
|
||||
},
|
||||
arguments: [],
|
||||
optional: false,
|
||||
},
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'next' },
|
||||
optional: false,
|
||||
},
|
||||
arguments: [],
|
||||
optional: false,
|
||||
},
|
||||
computed: false,
|
||||
property: { type: 'Identifier', name: 'value' },
|
||||
optional: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
async: false,
|
||||
expression: false,
|
||||
generator: false,
|
||||
};
|
||||
}
|
||||
function main(input) {
|
||||
const preprocessedPlayer =
|
||||
input.type === 'player'
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Autogenerated by devscripts/update-version.py
|
||||
|
||||
__version__ = '2026.02.04'
|
||||
__version__ = '2026.02.21'
|
||||
|
||||
RELEASE_GIT_HEAD = 'c677d866d41eb4075b0a5e0c944a6543fc13f15d'
|
||||
RELEASE_GIT_HEAD = '646bb31f39614e6c2f7ba687c53e7496394cbadb'
|
||||
|
||||
VARIANT = None
|
||||
|
||||
@ -12,4 +12,4 @@ CHANNEL = 'stable'
|
||||
|
||||
ORIGIN = 'yt-dlp/yt-dlp'
|
||||
|
||||
_pkg_version = '2026.02.04'
|
||||
_pkg_version = '2026.02.21'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user