yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
82.41k stars 6.43k forks source link

Paramount+ [list index out of range] error #1466

Open Sipherdrakon opened 2 years ago

Sipherdrakon commented 2 years ago

Checklist

Region

United States

Description

Some videos are giving the list index out of range error within paramountplus.com. I double checked the old releases and it works fine in the 08-02-2021 release but everything after gives the error.

Verbose log

ytdl0802 -F "https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/" --verbose
[debug] Command-line config: ['-F', 'https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.08.02 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.18363-SP0
[debug] exe versions: ffmpeg 4.4-full_build-www.gyan.dev, ffprobe 4.4-full_build-www.gyan.dev, rtmpdump 2.4
[debug] Proxy map: {}
[debug] [CBS] Extracting URL: https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/
[CBS] 7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_: Downloading XML
[CBS] 7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_: Downloading StreamPack SMIL data
[CBS] 7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[CBS] 7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_: Downloading JSON metadata
[info] Available formats for 7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_:
ID       EXT RESOLUTION |   TBR PROTO  | VCODEC        VBR ACODEC     ABR
-------- --- ---------- - ----- ------ - ----------- ----- --------- ----
hls-93   mp4 audio only |   93k m3u8_n |                   mp4a.40.2  93k
hls-496  mp4 640x360    |  496k m3u8_n | avc1.640028  496k mp4a.40.2   0k
hls-839  mp4 768x432    |  839k m3u8_n | avc1.640028  839k mp4a.40.2   0k
hls-1613 mp4 960x540    | 1613k m3u8_n | avc1.640028 1613k mp4a.40.2   0k
hls-2210 mp4 1024x576   | 2210k m3u8_n | avc1.640028 2210k mp4a.40.2   0k
hls-3101 mp4 1280x720   | 3101k m3u8_n | avc1.640028 3101k mp4a.40.2   0k
hls-4588 mp4 1920x1080  | 4588k m3u8_n | avc1.640028 4588k mp4a.40.2   0k

This is with the current version of yt-dlp

ytdl -F "https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/" --verbose
[debug] Command-line config: ['-F', 'https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.10.22 (win_exe)
[debug] Lazy loading extractors is disabled
[debug] Python version 3.9.4 (CPython 64bit) - Windows-10-10.0.18362-SP0
[debug] exe versions: ffmpeg 4.4-full_build-www.gyan.dev, ffprobe 4.4-full_build-www.gyan.dev, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [ParamountPlus] Extracting URL: https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/
[ParamountPlus] 7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_: Downloading JSON metadata
ERROR: list index out of range
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1310, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1335, in __extract_info
  File "yt_dlp\extractor\common.py", line 594, in extract
  File "yt_dlp\extractor\cbs.py", line 72, in _real_extract
  File "yt_dlp\extractor\paramountplus.py", line 101, in _extract_video_info
IndexError: list index out of range
pukkandan commented 2 years ago

This seems to have been broken in 6e6e0d95b32029b0d14843ffacc18305555e2230

Can u take a look @shirt-dev

october262 commented 2 years ago

strange this link - https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/ works with youtube-dl but it does fail with yt-dlp & youtube-dlc

2ShedsJackson commented 2 years ago

strange this link - https://www.paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found-part-1-2/ works with youtube-dl but it does fail with yt-dlp & youtube-dlc

It'll work if you replace paramountplus with cbs although the resulting URL doesn't lead to an actual webpage.

I don't understand why yt-dlp has separate extractors for cbs and paramountplus. Both sites share the same Program IDs, although each extractor tries to download JSON data from different sources. A unified extractor should attempt every different source (cbs, paramountplus, ThePlatform, etc). The "list index out of range" error is the result of the paramountplus extractor retrieving blank JSON information.

Fixing the problem is trivial but I'm wondering if there are any issues involved with merging the extractors.

pukkandan commented 2 years ago

It was split in https://github.com/yt-dlp/yt-dlp/pull/652 which is what is causing this issue. Any fix will need to adress both the URLs on that PR as well as the ones here

shirt-dev commented 2 years ago

Now that CBS has a fallback via #579, we could probably just get rid of the Paramount plus specific code and revert to the previous behavior.

mshiels commented 2 years ago

For sure would like to know which way everyone is thinking this should go. I found a bug and am willing to code up the fix to properly deal with the API for paramount+ having a 50 batch limit, no matter what you specify. But with little time I'd hate to code up throw away stuff, right?

Sipherdrakon commented 2 years ago

Does it say a specific reason why that video is unavailable? More than likely it's drm protected. They like to sprinkle a little drm in random series. Like 7th Heaven which has about 12 of the entire series under drm but the rest are downloadable. And teenage mutant ninja turtles all of season 5. Just a few examples. 😛

On Sat, Mar 5, 2022, 10:11 AM wxolp @.***> wrote:

whats interesting, is that this video requires login on the website:

https://paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found

but YT-DLP is able to download it. However this video plays on the website:

https://paramountplus.com/shows/the-harper-house/video/eyT_RYkqNuH_6ZYrepLtxkiPO1HA7dIU/the-harper-house-the-harper-house

but YT-DLP cant get it.

— Reply to this email directly, view it on GitHub https://github.com/yt-dlp/yt-dlp/issues/1466#issuecomment-1059780858, or unsubscribe https://github.com/notifications/unsubscribe-auth/APLSCXUX5Z6CJFDHSLUKTZ3U6N2SVANCNFSM5G5YEZQA . You are receiving this because you modified the open/close state.Message ID: @.***>

october262 commented 2 years ago

Does it say a specific reason why that video is unavailable? More than likely it's drm protected. They like to sprinkle a little drm in random series. Like 7th Heaven which has about 12 of the entire series under drm but the rest are downloadable. And teenage mutant ninja turtles all of season 5. Just a few examples. On Sat, Mar 5, 2022, 10:11 AM wxolp @.> wrote: whats interesting, is that this video requires login on the website: https://paramountplus.com/shows/star-trek-prodigy/video/7EZmrPOZXaX4kdmgjZhysGqHIDL1Nqs_/star-trek-prodigy-lost-found but YT-DLP is able to download it. However this video plays on the website: https://paramountplus.com/shows/the-harper-house/video/eyT_RYkqNuH_6ZYrepLtxkiPO1HA7dIU/the-harper-house-the-harper-house but YT-DLP cant get it. — Reply to this email directly, view it on GitHub <#1466 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/APLSCXUX5Z6CJFDHSLUKTZ3U6N2SVANCNFSM5G5YEZQA . You are receiving this because you modified the open/close state.Message ID: @.>

with star trek discovery S1 E14 The War Without, the War Within - https://www.paramountplus.com/shows/star-trek-discovery/video/jMYcFZuHg65fOr0ku2NMlmz8MgyFp_Ce/star-trek-discovery-the-war-without-the-war-within/ i get no video formats found.

Burve commented 2 years ago

It seems Paramount has changed their internal structure from https://www.paramountplus.com/shows/tooning-out-the-news/video/6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd/7-23-21-week-in-review-rep-jahana-hayes-howard-fineman-sen-michael-bennet-sheera-frenkel-cecilia-kang-/ To https://www.paramountplus.com/shows/video/6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd/

And it throws out extractor error ERROR: no suitable InfoExtractor for URL

krandor commented 2 years ago

Not sure if this is the same issue but the error message is the same. Of the shows I've attempted, this one is the only one having the issue.

yt-dlp --verbose --cookies /path/to/cookies.txt -F https://www.paramountplus.com/shows/video/vD_dS02AvEtutf2mdwdiOU0WZIpkhMPA/
[debug] Command-line config: ['--verbose', '--cookies', '/path/to/cookies.txt', '-F', 'https://www.paramountplus.com/shows/video/vD_dS02AvEtutf2mdwdiOU0WZIpkhMPA/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65] (zip)
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.0-109-generic-x86_64-with-glibc2.29
[debug] Checking exe version: ffprobe -bsfs
[debug] Checking exe version: ffmpeg -bsfs
[debug] exe versions: ffmpeg 4.2.4, ffprobe N-103927-g68815d6791
[debug] Optional libraries: certifi-2019.11.28, pycrypto-2.6.1, secretstorage-2.3.1, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] [ParamountPlus] Extracting URL: https://www.paramountplus.com/shows/video/vD_dS02AvEtutf2mdwdiOU0WZIpkhMPA/
[ParamountPlus] vD_dS02AvEtutf2mdwdiOU0WZIpkhMPA: Downloading JSON metadata
ERROR: list index out of range
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 1400, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 1470, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 635, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/cbs.py", line 70, in _real_extract
    return self._extract_video_info(self._match_id(url))
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/paramountplus.py", line 105, in _extract_video_info
    item = items_data['itemList'][-1]
IndexError: list index out of range

Is anyone else having this problem?

Burve commented 2 years ago

I usually get Index out of range when a new show come out, like Star Trek yesterday and only one episode is out. I assume Paramount is buggy, and it usually fixes itself later over time (when episode 2 or 3 will be out). maybe I am wrong about buggy Paramount

krandor commented 2 years ago

that must have been it, i just tried again and it downloaded no problems. I'll keep that in mind, thanks!