ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.47k stars 10.05k forks source link

CBS: all videos failing #31864

Open ghost opened 1 year ago

ghost commented 1 year ago

Checklist

Verbose log

using an assetType of Downloadable (not DRM):

https://www.cbs.com/shows/video/YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_/

[debug] Command-line args: ['--verbose', 'cbs:YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.4 (CPython) - Windows-10-10.0.18363-SP0
[debug] exe versions: ffmpeg 2022-06-09-git-5d5a014199-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[CBS] YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_: Downloading XML
ERROR: YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_: Failed to parse XML  (caused by
ParseError('no element found: line 1, column 0'))

same with assetType of StreamPack (not DRM):

https://paramountplus.com/movies/video/wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_

[debug] Command-line args: ['--verbose', 'cbs:wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.4 (CPython) - Windows-10-10.0.18363-SP0
[debug] exe versions: ffmpeg 2022-06-09-git-5d5a014199-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[CBS] wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_: Downloading XML
ERROR: wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_: Failed to parse XML  (caused by
ParseError('no element found: line 1, column 0'))

Description

looks like the issue is that these type URLs are now returning empty responses:

http://can.cbs.com/thunder/player/videoPlayerService.php?partner=cbs&contentId=wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_

I believe this started in the last day or two, not sure if temporary or permanent issue.

dirkf commented 1 year ago

As you haven't shown a verbose log, it's difficult to diagnose: clearly you aren't running the release build or a new git version, as neither recognise the CBS URL.

However the same result occurs with yt-dlp.

ghost commented 1 year ago

As you haven't shown a verbose log, it's difficult to diagnose: clearly you aren't running the release build or a new git version, as neither recognise the CBS URL.

I did show a verbose log, what are you talking about? I ran with --verbose as instructed. Also if you look closely, you'll notice I didn't provide a URL, I provided the cbs:ID

dirkf commented 1 year ago

Quite so, late at night in the UK, but you did omit the backtrace, so that's my weak excuse.

Using the cbs:ID, all three versions of interest (release yt-dl and yt-dlp, yt-dl git master) fail in the same way, as in the posted logs.

Someone (OP perhaps?) will have to do some research, eg on how this works in region in a browser, to fix this.

dirkf commented 1 year ago

Somewhat surprisingly no yt-dlp user has reported this. Could it be an artefact of the access network, eg if not in region or if using a blocked VPN?

october262 commented 1 year ago

the same video at paramount + https://www.paramountplus.com/shows/video/YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_/ works with yt-dlp & ytdl-patched but does not work with youtube-dl.

and this test link https://www.paramountplus.com/movies/video/wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_/ says it's DRM protected.

dirkf commented 1 year ago

Looks like this is all blocked (403) from UK.

october262 commented 1 year ago

does it not work with a VPN ??

dirkf commented 1 year ago

Possibly, but ATM I'll leave this to people able to access it directly. The question is whether OP's failure with cbs:... is repeatable given https://github.com/ytdl-org/youtube-dl/issues/31864#issuecomment-1473757202.

We now have ParamountPlus.com/gb but if it's anything like the offerings from the same group it'll be DRMed. Difficult to tell as even their device help page is broken,

ghost commented 1 year ago

Somewhat surprisingly no yt-dlp user has reported this. Could it be an artefact of the access network, eg if not in region or if using a blocked VPN?

If can.cbs.com means Canada, then it would make sense to try Canada VPN. I retried the PHP URL with United States and Canada, still failing.

and this test link https://www.paramountplus.com/movies/video/wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_/ says it's DRM protected.

Several videos offer both DRM and non DRM streams. For example, the one you've commented on, both DASH_CENC (DRM) and StreamPack (not DRM) are offered. However in addition to the PHP error already discussed, another one has recently occured. If you make a StreamPack request, such as:

curl -v link.theplatform.com/s/dJ5BDC/media/guid/2198311517/wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_

You get an HLS URL, as expected:

https://cbsios-vh.akamaihd.net/i/temp_hd_gallery_video/CBS_Production_Outlet_VMS/video_robot/CBS_Production_Entertainment/2020/05/07/1735196227871/0_0_3436402_ful01_2588_503000.mp4.csmil/master.m3u8

but if you actually try to request the HLS, you get:

HTTP/1.0 400 Bad Request

so it appears that all StreamPack options are dead, either temporarily or permanent, with the cause being an accident or a purposeful action by CBS. So until something changes any StreamPack options are essentially DRM.

the same video at paramount + https://www.paramountplus.com/shows/video/YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_/ works with yt-dlp & ytdl-patched but does not work with youtube-dl.

this is a Downloadable type, which might be the only non DRM type still available. Note that previously an HLS_CLEAR type was available as well, but I think those have been dropped, not sure.

Someone (OP perhaps?) will have to do some research, eg on how this works in region in a browser, to fix this.

I plan to work on this some more this weekend. I want to see what a web client is doing on the few non DRM options left, and also check Android client.

forty875 commented 1 year ago

Does this endpoint no longer work can.cbs.com/thunder/player/videoPlayerService.php ? I get status code 200 but no output...

dirkf commented 1 year ago

From the issue text:

looks like the issue is that these type URLs are now returning empty responses:

http://can.cbs.com/thunder/player/videoPlayerService.php?partner=cbs&contentId=wQH9yE_y_Dt4ekDYm3yelhhY2KXvOra_

So, yes.

forty875 commented 1 year ago

How to get all the pids for all asset types now for example DASH_CENC , PRECON or HLS ? link.theplatform.com needs pid to get m3u or mpd manifest...

dirkf commented 1 year ago

Won't a trace of playing a test video in a desktop browser do?

ghost commented 1 year ago

@dirkf regarding web clients, if you dont use Safari, or a Safari User-Agent, or another Apple specific browser (I dont know what those would be), then likely you are just going to be served DASH, either Widevine or clear. So using an Apple client, either desktop or mobile is an important point here, for any who might care about HLS formats. I didn't make time for this over the last couple of days (busy with other stuff), but I will try to look at it this week, unless someone beats me to it.

ParadoxGBB commented 1 year ago

For me the original XML parse error is a somewhat separate issue from whether they are DRM'd that cropped up this week after working fine --- I had been using yt-dlp to download the subtitles and thumbnails without the content via the --skip-download parameter. Started failking for this series Tuesday for me.

Examples:

"https://www.cbs.com/shows/video/yJDiL4UCGqhPMzYeI7_uGETDWFuGRNui/" "https://www.cbs.com/shows/video/TTobd7NjENoNESGeCpmsirueC4HOYDge/" "https://www.cbs.com/shows/video/mjADR3rryehJKHRKqapazoYY0UX_6_F_/"

It's also retroactive with previously working videos apparently now failing, so an unresponsive endpoint seems logical to me.

Hope folks can help figure something out.

dirkf commented 1 year ago

For the final Colbert show of those three, I get these interesting JS fragments in the non-JS page seen by yt-dl, after pretty-printing:

Colbert fragments ```py player.metaData = { 'airdate_iso': '2023-03-29T20:35:00-07:00', 'airdate_tv': '2023-03-29', 'assetType': 'DASH_CENC', 'brand': 'CBS', 'mediaType': 'Full Episode', 'channelName': null, 'contentId': 'mjADR3rryehJKHRKqapazoYY0UX_6_F_', 'contentUrl': '/shows/video/mjADR3rryehJKHRKqapazoYY0UX_6_F_/', 'endCreditsChapterTime': 2430, 'episodeNumber': '94', 'ESTURLs': { 'amazon': '', 'iTunes': '' }, 'excludeOztam': null, 'fullEpisode': true, 'isServiceAllowed': true, 'oztamMediaId': null, 'pid': 'Z8rFLBAAODE5', 'daistreamKey': null, 'previewImageURL': 'https://thumbnails.cbsig.net/CBS_Production_Entertainment_VMS/2023/03/05/2178777667682/colbert_1396_2141418_1920x1080.jpg', 'rating': 'TV-14', 'regionalRatings': [ { 'region': 'US', 'rating': 'TV-14', 'disclaimer': null, 'secondaryDescriptors': null, 'subratings': null, 'consumerAdvice': null, 'ratingIcon': null } ], 'seasonNumber': '8', 'seriesTitle': 'The Late Show with Stephen Colbert', 'showPageURL': 'shows/the-late-show-with-stephen-colbert/video', 'subscriptionLevel': 'FREE', 'thumbnail': { 'height': 1080, 'width': 1920, 'assetType': 'Thumbnail', 'url': 'https://thumbnails.cbsig.net/CBS_Production_Entertainment_VMS/2023/03/05/2178777667682/colbert_1396_2141418_1920x1080.jpg' }, 'thumbnailSheet': { 'height': 126, 'width': 54656, 'assetType': 'ThumbSheet', 'url': 'https://thumbnails.cbsig.net/CBS_Production_Entertainment_VMS/2023/03/05/2178777667682/COLBERT_1396_2997DF_1920X1080_178_2CH_PRORESHQ_2141419_vr_cs_224x126_10_244.jpg' }, 'tvRatingFlag': true, 'videoLength': 2439, 'videoPageURL': '/shows/video/mjADR3rryehJKHRKqapazoYY0UX_6_F_/', 'videoTitle': 'The Late Show - 3/29/23 (Taron Egerton, Jay Chandrasekhar)', 'label': '3/29/23 (Taron Egerton, Jay Chandrasekhar)', 'videoProperties': [ 'Branded', 'Current Season', 'Episodeless' ], 'playbackEvents': { 'endCreditChapterTimeMs': 2430000, 'previewStartTimeMs': null, 'previewEndTimeMs': null, 'openCreditEndTimeMs': null, 'openCreditStartTime': null } }; player.apiMetadata = { 'genre': 'Talk', 'status': 'AVAILABLE', '_firstIngestDate': '03/30/23 02:26 EDT', 'expired': false, 'showPageUrl': 'shows/the-late-show-with-stephen-colbert/video', 'cbsShowId': 61456254, 'primaryCategory': '518039619867', 'primaryCategoryName': 'Late Night/Late Show/Colbert/Full Episodes', 'editDate': 1680157555000, '_editDate': '03/30/23 02:25 EDT', '_lastModifiedDate': '03/30/23 02:26 EDT', 'ingestDate': 1680157561000, 'airDate': 1680147300000, 'description': 'Stephen welcomes actor Taron Egerton and comedian Jay Chadrasekhar.', 'shortDescription': 'Stephen welcomes actor Taron Egerton and comedian Jay Chadrasekhar.', 'pubDate': 1680157561000, 'label': '3/29/23 (Taron Egerton, Jay Chandrasekhar)', 'videoPageUrl': 'shows/the-late-show-with-stephen-colbert/video/mjADR3rryehJKHRKqapazoYY0UX_6_F_/the-late-show-3-29-23-taron-egerton-jay-chandrasekhar-', 'url': 'shows/the-late-show-with-stephen-colbert/video/mjADR3rryehJKHRKqapazoYY0UX_6_F_/the-late-show-3-29-23-taron-egerton-jay-chandrasekhar-', 'assetType': 'DASH_CENC', 'firstIngestDate': 1680157561000, 'category': '', 'topLevelCategory': 'Entertainment', 'fullEpisode': true, 'exclusive': false, 'contentId': 'mjADR3rryehJKHRKqapazoYY0UX_6_F_', 'title': 'The Late Show - 3/29/23 (Taron Egerton, Jay Chandrasekhar)', '_ingestDate': '03/30/23 02:25 EDT', 'episodeNum': '94', '_pubDate': '03/30/23 02:26 EDT', 'seasonNum': '8', 'brand': 'CBS', 'pid': 'Z8rFLBAAODE5', 'seriesTitle': 'The Late Show with Stephen Colbert', '_airDate': '03/29/23 23:35 EDT', 'duration': 2439, 'lastModifiedDate': 1680157561000, 'rating': 'tv-14', 'deviceType': 'PC', 'thumbnail': 'https://thumbnails.cbsig.net/CBS_Production_Entertainment_VMS/2023/03/05/2178777667682/colbert_1396_2141418_1920x1080.jpg', 'amazonESTURL': '', 'itunesESTURL': '', 'streamingUrl': 'https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2023/03/05/2178777667682/2141560_cenc_dash/stream.mpd', 'expirationDate': 1680766500000, '_expirationDate': '04/06/23 03:35 EDT', '_pubDateISO': '2023-03-29T23:26:01-07:00', '_airDateISO': '2023-03-29T20:35:00-07:00', 'playerLocUrl': 'http://can.cbs.com/thunder/player/chrome/canplayer.swf?allowScriptAccess=always&allowFullScreen=true&pid=Z8rFLBAAODE5&partner=cbs_us_free_desktop&autoPlayVid=false&owner=CBS Production Entertainment', 'subscriptionLevel': 'FREE', 'mediaAvailableDate': '2023-03-30T00:35:00-0700', 'mediaAvailableDateEpoch': 1680161700000, 'closedCaptionUrl': 'https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/caption-rmp/COLBERT_1396_2997_1680155824.xml', 'isLive': false, 'cmsAccountId': 'dJ5BDC', 'appleWatchListShowKey': 'SHOW_61456254_The-Late-Show-with-Stephen-Colbert', 'isProtected': true, 'mediaType': 'Full Episode', 'excludeNielsenTracking': false, 'endCreditsChapterTime': '40:30', 'thumbnailSet': [ { 'height': 1080, 'width': 1920, 'assetType': 'Thumbnail', 'url': 'https://thumbnails.cbsig.net/CBS_Production_Entertainment_VMS/2023/03/05/2178777667682/colbert_1396_2141418_1920x1080.jpg' } ], 'downloadCountrySet': [ ], 'regionalRatings': [ { 'region': 'US', 'rating': 'TV-14', 'disclaimer': null, 'secondaryDescriptors': null, 'subratings': null, 'consumerAdvice': null, 'ratingIcon': null } ], 'premiumFeatures': [ '' ], 'videoProperties': [ 'Branded', 'Current Season', 'Episodeless' ], 'availableForProfileTypes': [ 'ADULT' ], 'playbackEvents': { 'endCreditChapterTimeMs': 2430000, 'previewStartTimeMs': null, 'previewEndTimeMs': null, 'openCreditEndTimeMs': null, 'openCreditStartTime': null }, 'embeddable': 'false', 'copyright': 'CBS, Inc.', 'addOns': [ ], 'isContentAccessibleInCAN': true, 'brandSlug': 'cbs', 'tmsprogramID': 'EP019062761435', 'tmsseriesID': 'SH019062760000', 'thumbnailSheetSet': [ { 'height': 126, 'width': 54656, 'assetType': 'ThumbSheet', 'url': 'https://thumbnails.cbsig.net/CBS_Production_Entertainment_VMS/2023/03/05/2178777667682/COLBERT_1396_2997DF_1920X1080_178_2CH_PRORESHQ_2141419_vr_cs_224x126_10_244.jpg' } ], '__FOR_TRACKING_ONLY_MEDIA_ID': 2178777667707 }; player.tms_program_id = 'EP019062761435'; // Set player.drm here/inline unless promise for client-side AJAX if (!window.CBS.Registry.drmPromise) { player.drm = { 'enabled': true, 'sessionId': '', 'ticket': '', 'name': 'Widevine', 'widevine': { 'url': 'https://cbsi.live.ott.irdeto.com/widevine/getlicense?CrmId=cbsi&AccountId=cbsi&SubContentType=Default&ContentId=mjADR3rryehJKHRKqapazoYY0UX_6_F_', 'header': { 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6IjNkNjg4NGJmLWViMDktNDA1Zi1hOWZjLWU0NGE1NmY3NjZiNiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhbm9ueW1vdXNfVVMiLCJlbnQiOlt7ImJpZCI6IkFsbEFjY2Vzc01haW4iLCJlcGlkIjo3fV0sImlhdCI6MTY4MDE5NTgzNSwiZXhwIjoxNjgwMjAzMDM1LCJpc3MiOiJjYnMiLCJhaWQiOiJjYnNpIiwiaXNlIjp0cnVlLCJqdGkiOiJjZjhhZDc3NS03YTA3LTQyY2YtYjM2OC03M2NhZDM1ZDMyMWEifQ.OGbUVBCX5e1oVsDbbpglZuqUCxgjS7kWvz9f0w0lTh0' } } }; ```

The first two look similar, so I guess no Colbert for yt-dl.

ParadoxGBB commented 1 year ago

No, but as the closed captioning jpeg and thumbnail are correctly published it seems I would have expected yt-dlp to move on from the XML error with --skip-download and grab those. But I'm largely out of my depth here.

october262 commented 1 year ago

take the Halo TV series for instance -https://www.paramountplus.com/shows/halo/ , none of the the season episodes will download, but any of the behind the scenes, special features & clips will download fine.

dirkf commented 1 year ago

In the Colbert JSON quoted above:

'playerLocUrl': 'http://can.cbs.com/thunder/player/chrome/canplayer.swf?allowScriptAccess=always&allowFullScreen=true&pid=Z8rFLBAAODE5&partner=cbs_us_free_desktop&autoPlayVid=false&owner=CBS Production Entertainment',

This just gives an opaque binary file with initial bytes CWS. Apparently it's a compressed SWF which can then be edited with a suitable SWF tool imported from prehistory, or even just a hex editor, but appears to be generic.

ghost commented 1 year ago

OK I did some more research, I did not find any method to enumerate all assetType values:

https://github.com/4cq2/mech/blob/v1.2.8/paramount/assetType.md

So it seems for now some values are hidden, only available to people who already know they exist. Downloadable is still a valid value, so some videos are still available without DRM.

dirkf commented 1 year ago

Somehow the web and Android app manage to construct a playable URL, regardless of this (possibly requiring WV/FP). How does that happen? What do playable URLs look like?

ghost commented 1 year ago

Somehow the web and Android app manage to construct a playable URL, regardless of this (possibly requiring WV/FP). How does that happen? What do playable URLs look like?

Not really sure what you are asking here. The web client always chooses DRM, even if non DRM is available. In fact, it will prevent you from playing at all if you disable DRM browser plugin. Regarding the Android client, as mentioned in the research document in my previous comment, the Android client only returns DRM options, even if non DRM options are available.

So regarding "playable URLs", it doesn't really matter what methods the official clients use to general playable URLs (at least as far as YouTube-DL/YT-DLP are concerned), as all playable URLs generated by official clients are DRM enabled. Again to be clear, non DRM options are still available, but they are more limited than ever, and it appears no method is currently available to even enumerate what non DRM options might be available. I didn't do any research into the auth query string key, so its possible that might be the fix. If I had to guess, I would say its the same as the LS_Session value, but I didn't check that. My previous research document was nearly exhaustive, so I am about mentally checked out on this matter.

dirkf commented 1 year ago

Thanks: you answered the question anyway!

Some other platforms have legacy implementations that can't be updated but have to continue playing content: perhaps these limited non-DRM options are provided for such a reason.

ghost commented 1 year ago

one note - currently I think the only non DRM assetTypes value is Downloadable. I did find some examples with mediaType of Full Episode:

https://paramountplus.com/shows/video/YxlqOUdP1zZaIs7FGXCaS1dJi7gGzxG_

but none with mediaType of Movie, so its possible that all Movie are now DRM only. I am not sure of anything I just said, so if someone can prove me wrong, I will be happy to hear it.