Repository: youtube-dl
Issue: [mtv] Add support for new mtv portal www.mtvplay.tv
Labels: geo-restricted

## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your _issue_ (like that [x])
- Use _Preview_ tab to see how your issue will actually look like

---
### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.09.27_. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.09.27**
### Before submitting an _issue_ make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---
### If the purpose of this _issue_ is a _bug report_, _site support request_ or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):

```
youtube-dl.exe -v "http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', "http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying"]
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2016.09.27
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: ffmpeg N-76776-g3c110b0, ffprobe N-76776-g3c110b0, rtmpdump 2.4
[debug] Proxy map: {}
[generic] crying: Requesting header
WARNING: Falling back on generic information extractor.
[generic] crying: Downloading webpage
[generic] crying: Extracting information
ERROR: Unsupported URL: http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpaa64pv68\build\youtube_dl\YoutubeDL.py", line 694, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpaa64pv68\build\youtube_dl\extractor\common.py", line 355, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpaa64pv68\build\youtube_dl\extractor\generic.py", line 2424, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying
```

---
### If the purpose of this _issue_ is a _site support request_ please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):

Example 1:
- Single video:
  http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying

Example 2:
- Single video: 
  http://www.mtvplay.tv/shows/308/1/1-folge+1

Example 3:
- Single video:
  http://www.mtvplay.tv/shows/308-game+one/13/6-game-one-shows-season_13-episode_6

---

Hi everyone,

first of all thanks for youtube-dl/this project, it helped me many times in the past :)

This is a request to support the new mtv video portal www.mtvplay.tv

I tried to wrap my head around the extractors and how youtube-dl works but it seems in this case I am stuck.

From what I've understood with my limited python knowledge it seems that the method for getting the URL for the media file(s) is quite similar as already present in the mtv.py extractor. I tried to debug this.

For Example 1:
1. You can request the page of the episode/video with any of the following URLs, they all point to the same video/episode:
   http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/
   http://www.mtvplay.tv/shows/1118/1/1
   http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying
   (note that the last "/" in the last URL is part of the episode name)
2. During loading a request will be made to the following URL
   http://api.mtvnn.com/v2/mrss.xml?uri=mgid:sensei:video:mtvnn.com:local_playlist-2715cd5ddab5799ba981&siteKey=mtvplay.DE
   (so quite similar to the current mtv extractor)
   "&siteKey=mtvplay.DE" is possibly region-specific, but the request also works without it
3. Which contains the following URL
   http://videos.mtvnn.com/mediagen/12e62c6cd6873703db4b91854512dae9
   Requesting this one will give a list of the rtmp URLs to the videos

I am stuck on the very first step to get the original webpage/source to somehow parse this info from it unfortunately.

When downloading source URL
http://www.mtvplay.tv/shows/1118-mike+judge's+beavis+and+butt-head/1/1-werewolves+of+highland/crying

the resulting HTML document doesn't have any infos about the video or content, only very general styling information etc. Seems this URL has something to do with it? 
http://www.mtvplay.tv/shows/308-game+one/13/build.js

Example 2:
1. Source page (again, all URLs point to the same page)
   http://www.mtvplay.tv/shows/308-game+one
   http://www.mtvplay.tv/shows/308-game+one/1/1
   http://www.mtvplay.tv/shows/308/1/1-folge+1
2. http://api.mtvnn.com/v2/mrss.xml?uri=mgid:sensei:video:mtvnn.com:local_playlist-1c3e61fec5312c9eb3f4&siteKey=mtvplay.DE
3. http://videos.mtvnn.com/mediagen/ea4ab782f026b77e172fe72b5eefce67

Example 3:
1. Source
   http://www.mtvplay.tv/shows/308/13/6
   http://www.mtvplay.tv/shows/308-game+one/13/6-game-one-shows-season_13-episode_6
2. http://api.mtvnn.com/v2/mrss.xml?uri=mgid:sensei:video:mtvnn.com:local_playlist-a6bf8190797e0e0b5c35&siteKey=mtvplay.DE
3. http://videos.mtvnn.com/mediagen/bb1a436f52cab67576ffbeee67f9c228

I hope that helps and the site can be supported in the future. Thanks, have a nice day guys