Repository: ytdl-org/youtube-dl

Issue:
Am not able to download a bunch of videos from 2012 Olympics
As the title says, I am not able to download videos from the 2012 Olympics. 

Youtube-dl previously worked with these videos. I had a list of about 40 that I was downloading and had completed some.

Now, however, all (those downloaded and those not) have the same error as listed below.

```
youtube-dl -f bestvideo+bestaudio/best --verbose lqQg6PlCWgI
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', 'bestvideo+bestaudio/best', '--verbose', 'lqQg6PlCWgI']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.12.01
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-56165-, ffprobe N-56165-, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] lqQg6PlCWgI: Downloading webpage
[youtube] lqQg6PlCWgI: Extracting video information
Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "youtube_dl\__init__.pyo", line 355, in main
  File "youtube_dl\__init__.pyo", line 345, in _real_main
  File "youtube_dl\YoutubeDL.pyo", line 1117, in download
  File "youtube_dl\YoutubeDL.pyo", line 553, in extract_info
  File "youtube_dl\extractor\common.pyo", line 241, in extract
  File "youtube_dl\extractor\youtube.pyo", line 949, in _real_extract
TypeError: 'NoneType' object has no attribute '__getitem__'
```

Thank you for your help!

Am not able to download a bunch of videos from 2012 Olympics
As the title says, I am not able to download videos from the 2012 Olympics. 

Youtube-dl previously worked with these videos. I had a list of about 40 that I was downloading and had completed some.

Now, however, all (those downloaded and those not) have the same error as listed below.

```
youtube-dl -f bestvideo+bestaudio/best --verbose lqQg6PlCWgI
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', 'bestvideo+bestaudio/best', '--verbose', 'lqQg6PlCWgI']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.12.01
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-56165-, ffprobe N-56165-, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] lqQg6PlCWgI: Downloading webpage
[youtube] lqQg6PlCWgI: Extracting video information
Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "youtube_dl\__init__.pyo", line 355, in main
  File "youtube_dl\__init__.pyo", line 345, in _real_main
  File "youtube_dl\YoutubeDL.pyo", line 1117, in download
  File "youtube_dl\YoutubeDL.pyo", line 553, in extract_info
  File "youtube_dl\extractor\common.pyo", line 241, in extract
  File "youtube_dl\extractor\youtube.pyo", line 949, in _real_extract
TypeError: 'NoneType' object has no attribute '__getitem__'
```

Thank you for your help!



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -934,7 +934,7 @@ def _map_to_format_list(urlmap):
                 'url': video_info['conn'][0],
                 'player_url': player_url,
             }]
-        elif len(video_info.get('url_encoded_fmt_stream_map', [])) >= 1 or len(video_info.get('adaptive_fmts', [])) >= 1:
+        elif len(video_info.get('url_encoded_fmt_stream_map', [''])[0]) >= 1 or len(video_info.get('adaptive_fmts', [''])[0]) >= 1:
             encoded_url_map = video_info.get('url_encoded_fmt_stream_map', [''])[0] + ',' + video_info.get('adaptive_fmts', [''])[0]
             if 'rtmpe%3Dyes' in encoded_url_map:
                 raise ExtractorError('rtmpe downloads are not supported, see https://github.com/rg3/youtube-dl/issues/343 for more information.', expected=True)


Test patch: