In order to be able to download videos from mtv (no matter the country and various other sites of their network) we need the mgid.
One of the easiest ways is the following:
For com https://www.mtv.com/feeds/triforce/manifest/v8?url=http%3A%2F%2Fwww.mtv.com%2Fepisodes%2F4iqsts%2Frevenge-prank-the-prank-that-hits-the-jackpot-season-1-ep-16
For de https://www.mtv.de/feeds/triforce/manifest/v8?url=http%3A%2F%2Fwww.mtv.de%2Ffolgen%2Fhxzmi4%2Fgeordie-shore-die-neue-chloe-S21-F7 and so on.
Note that url=http (!) if you try to use https it won't work for now but MTV is about to change their system to using https.
So there should be some error handling built in (site will return json with 404).
There is also another case which needs to be handled:
This means we have to probe the feed again with the new url.
As a result we get a manifest. It contains various informations. The most important for us now is the
itemId as we can either download
another feed to get the mgid or simply build it on our own with the
For the mgid we simply need something like this:
mgid:arc:episode:mtv.com:itemId we can replace episode with video as well but it shouldn't matter.
Do use the correct network (mtv.com in this case) as well!
The replaced version will look like this:
Then either use the universally media rss feed
or (for mtv.com only)
There we could use the the content video url or build it ourself since we need to modify the query anyway.
Without modification it will give us some encrypted rtmp streams (rtmpe) which we cannot properly use.
Instead we will grab the hls (dash is also available but I haven't figured out how to grab better qualities if that is even possible)
So the mrss feed may have several items. Each item has a media:group there we gonna need
It's the id of each separate (if multiple) video.
As a backup we can also try to get this value
as it's the same as the video id.
Now we can build the mediagenerator link like this:
We gonna do that for each item in the mrss feed. In the end we need to concat all parts together.
So it comes in handy if we append the index number of each item to the file name or simply use the title.
All that is left is to download the master playlist which contains all different qualities as dedicated playlists.
After picking a quality feed the playlist to a hls downloader.
itemId may also be found in the html doc directly tho it depends on the network how they are named.
There are different
device types such as
iPad, Android, Xbox etc. some of them may require or can use additional queries.