Open nikolai-mitnik opened 2 years ago
Update: Just tried with Master and the same issue is happening there also.
Try with --playlist-items 2 --write-pages
and then let's look at the downloaded page for git-use-git-flow-as-a-reliable-version-control-model
.
Thanks for your reply @dirkf , here is the result.
So no video links in the git-use-git-flow-as-a-reliable-version-control-model.dump
JSON. I assume there is video in this lesson: sometimes these instructional sites just have text and individual slides in a lesson.
What is the result of fetching this JSON in your logged-in browser session?
https://app.egghead.io/api/v1/lessons/git-use-git-flow-as-a-reliable-version-control-model
In this case all are videos, but it seems egghead made a good work to hide their content, here is the data you asked and also some extra data that could give more hints of the videos.
Ok so I found an audio and a video, I think cloudfront is configured to serve this files only a couple minutes or so.
audio file Request URL: https://d2c5owlt6rorc3.cloudfront.net/tools-use-git-flow-as-a-reliable-version-control-model-99457b3048/audio_tools-use-git-flow-as-a-reliable-version-control-model-99457b3048.m3u8 video file Request URL: https://d2c5owlt6rorc3.cloudfront.net/tools-use-git-flow-as-a-reliable-version-control-model-99457b3048/video_720p_tools-use-git-flow-as-a-reliable-version-control-model-99457b3048.m3u8
What about this from your logged-in session: https://app.egghead.io/api/v1/lessons/git-use-git-flow-as-a-reliable-version-control-model/media
I logged in opened the video lesson, and then accessed that path and it's an empty object {}
OK, looks like it needs something more than just cookies and Referer, then.
yt-dl's extraction first runs the EggheadCourse extractor, which
http_url
members of the returned lesson list (eg, https://app.egghead.io/lessons/git-use-git-flow-as-a-reliable-version-control-model)items
member of this seems to be just the lessons list previously fetched, so we could have got both at once)Next yt-dl processes the playlist and invokes the EggheadLesson extractor on each lesson URL, which:
git-use-git-flow-as-a-reliable-version-control-model
)media_urls
member of the lesson object -- oopsWe don't get a media_urls
member for the non-free lesson example, at least not for me when not logged in, and apparently not for you using yt-dl with logged-in cookies.
Probably we should be sending some additional header(s) or making some intermediate request to satisfy the Egghead fairy. You might be able to find the /api/v1/lessons/...
request in the devtools when accessing the lesson https://app.egghead.io/lessons/git-use-git-flow-as-a-reliable-version-control-model. If so, you might use the right-button 'Save as HAR' option to save the details of the request.
Checklist
Verbose log
Description
Only download first video of the playlists is the free one, however I am using a paid account, and passing token or cookies, none of them works, I can pass a login link for you to debug, thanks in advance!