youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

pbs.org downloads for preview vs. full episode

Open sjthespian opened this issue 2 years ago • 3 comments

Checklist

  • [X] I'm reporting a site feature request
  • [X] I've verified that I'm running youtube-dl version 2021.12.17
  • [X] I've searched the bugtracker for similar site feature requests including closed ones

Description

The pbs.org site has recently started providing both preview and full episodes for some of their programming. For an example, most of the episodes of Great Performances such as this episode with "The Merry Wives of Windsor": https://www.pbs.org/wnet/gperf/great-performances-merry-wives-about/13604/.

It appears that youtube-dl can only pull the preview version of the episodes, even with a cookie file that contains the login authentication for my local PBS provider. Using youtube-dl -F --cookies cookies.txt shows a handful of 403s - I am not sure if these are the full episodes streams or just something odd in the output.

❯ youtube-dl -F --cookies cookies.txt https://www.pbs.org/wnet/gperf/great-performances-merry-wives-about/13604/
[pbs] Downloading JSON metadata
[pbs] 13604: Downloading webpage
[pbs] 13604: Downloading player page
[pbs] 13604: Downloading widget/partnerplayer page
[pbs] 13604: Downloading portalplayer page
[pbs] 13604: Downloading 0 video url info
[pbs] 13604: Downloading m3u8 information
[pbs] 13604: Downloading 1 video url info
[pbs] 13604: Checking http-2000k video URL
[pbs] 13604: http-2000k video URL is invalid, skipping: HTTP Error 403: Forbidden
[pbs] 13604: Checking http-6500k video URL
[pbs] 13604: http-6500k video URL is invalid, skipping: HTTP Error 403: Forbidden
[pbs] 13604: Checking http-4500k video URL
[pbs] 13604: http-4500k video URL is invalid, skipping: HTTP Error 403: Forbidden
[pbs] 13604: Checking http-3000k video URL
[pbs] 13604: Checking http-1100k video URL
[pbs] 13604: http-1100k video URL is invalid, skipping: HTTP Error 403: Forbidden
[pbs] 13604: Checking http-730k video URL
[pbs] 13604: http-730k video URL is invalid, skipping: HTTP Error 403: Forbidden
[info] Available formats for 3067608751:
format code  extension  resolution note
0            mp4        unknown
hls-206      mp4        416x234     206k , avc1.4d400c, 9.99fps, mp4a.40.5
hls-501      mp4        480x270     501k , avc1.4d4015, 14.985fps, mp4a.40.5
hls-902      mp4        640x360     902k , avc1.64001e, 29.97fps, mp4a.40.5
hls-1287     mp4        768x432    1287k , avc1.64001e, 29.97fps, mp4a.40.5
hls-2236     mp4        960x540    2236k , avc1.64001f, 29.97fps, mp4a.40.5
hls-3284     mp4        1280x720   3284k , avc1.64001f, 29.97fps, mp4a.40.5
http-3284    mp4        1280x720   3284k , avc1.64001f, 29.97fps, mp4a.40.5
hls-4932     mp4        1280x720   4932k , avc1.64001f, 29.97fps, mp4a.40.2
hls-7051     mp4        1920x1080  7051k , avc1.640028, 29.97fps, mp4a.40.2 (best)

Is there any way to automatically fetch the full episode, short of using inspect to dig the full URL out of the rendered page source?

sjthespian avatar Jul 06 '22 17:07 sjthespian

See https://github.com/yt-dlp/yt-dlp/issues/3092.

The patch there doesn't help for me, but the web page that yt-dl sees has Watch Full Episode greyed out, possibly indicating that you this function is not available (or that some procedure mediated by JS has to be run to enable it).

The patch finds the full episode id from the page, but each of the player URLs that it uses to get the media links says We're sorry, but this video is not available.. Is the episode still available after May 27?

If you can still play the full episode in a browser, ideally after disabling DRM, with or without the local provider cookies, then it's worth trying the patch, and that would actually be very useful in deciding whether to roll it out. Let us know.

dirkf avatar Jul 08 '22 10:07 dirkf

It should enable that button if you contribute to a local PBS station, but let me see if I can give it a try with the patch. I use a cookie file when I run the downloads, and they work fine that way as long as I dig out the direct video URL.

sjthespian avatar Jul 13 '22 16:07 sjthespian

You don't need cookies for this

89z avatar Jul 13 '22 17:07 89z

Are you still looking for someone to test that patch?

Baenwort avatar Jun 13 '23 04:06 Baenwort

Always.

dirkf avatar Jun 13 '23 09:06 dirkf

So I've failed at figuring out how to test that patch. Is there a branch or something I can pull or something else I'm missing on how to grab and test it?

Baenwort avatar Oct 01 '23 19:10 Baenwort