Repository: ytdl-org/youtube-dl

Issue:
[vtm] encrypted video
## 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 this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.11.06*. 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 **2017.11.06**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [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*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

```
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--username', 'PRIVATE', '--password', 'PRIVATE', 'https://vtm.be/video/volledige-afleveringen/id/vtm_20171026_VM067B1F2_vtmwatch']
[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2017.10.29
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-87257-g8e17cd2
[debug] Proxy map: {}
[Medialaan] vtm_20171026_VM067B1F2_vtmwatch: Downloading webpage
Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\__init__.py", line 465, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\__init__.py", line 455, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\YoutubeDL.py", line 1985, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\common.py", line 434, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\medialaan.py", line 168, in _real_extract
IndexError: list index out of range

...
<end of log>
```

Most of the video i can download, but in this series there is 1 episode that is different.
The website requires account credentials.
You can require them for free.
Maybe there is also a geolocation requirement.



Discussion:
Got a similar error:

````
# youtube-dl "https://vtm.be/video/volledige-afleveringen/id/vtm_20171219_VM067BECB_vtmwatch" --username 'redacted' --password 'redacted'
[Medialaan] vtm_20171219_VM067BECB_vtmwatch: Downloading webpage
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 465, in main
    _real_main(argv)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 455, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1958, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 776, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 434, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/medialaan.py", line 177, in _real_extract
    url, webpage, video_id, m3u8_id='hls')[0]
IndexError: list index out of range
````

Resolving patch:
diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py
--- a/youtube_dl/extractor/medialaan.py
+++ b/youtube_dl/extractor/medialaan.py
@@ -141,6 +141,7 @@ def _real_extract(self, url):
 
         vod_id = config.get('vodId') or self._search_regex(
             (r'\\"vodId\\"\s*:\s*\\"(.+?)\\"',
+             r'"vodId"\s*:\s*"(.+?)"',
              r'<[^>]+id=["\']vod-(\d+)'),
             webpage, 'video_id', default=None)
 


Test patch: