• 2 Posts
  • 597 Comments
Joined 2 years ago
cake
Cake day: July 31st, 2023

help-circle













  • I have used selenium in the past. The trick is to capture all cross-loaded connections and then go through them and pattern match to the m3u8. Now selenium out of the box can’t do that, but you will be able to use seleniumwire to capture those connections from selenium.

    The drawback of this approach is it takes some time to tune the script and the pattern, and although selenium can be run headless, it’s still a full browser, making it very memory- inefficient.

    Depending on the popularity of the site, jdownloader might be able to capture it as well and even if it’s not fully supported, you can use their url filters to strip down the urls to only capture the m3u8. However this is kind manual, so it’s just more efficient than clicking but not automated. I guess maybe if you get all the urls in a big list and then let jdownloader iterate over all of them it’s more efficient.

    Maybe yt-dlp has some options for fetching the m3u8 from a base url but I’m not so sure.

    Basically the issue is you are fighting against the developers, who want you to view but not download the content, and thus they pour some time into making sure that you are actually visiting the site and not ripping the content. So it’s always gonna be difficult and the seleniumwire method is kind of the best I ever got.