Hmmm, not 100% certain but it sounds like a program I use called StreamFab might be what you need. I'd recommend this site to get it from too, a great team of really helpful moderators and site users -
Once you've set up an account on TeamOS search for StreamFab, find the post with the latest version and download the torrent file. If you're familiar with torrents you'll know what to do with this. Install StreamFab as per the readme file that comes with all their downloads and for goodness sake, make sure you seed the torrent for at least 3 days a per the site rules.
The great thing about StreamFab is you can login to whichever site you want DRM M3U8 content from and once you land on the page where said content is, a download menu will appear! Hope this helps.
đź‘Ť