Repository: ytdl-org/youtube-dl

Issue:
[daum.net] Error downloading http://m.tvpot.daum.net/v/65139429
Split from #8267

```
$ youtube-dl -v "http://m.tvpot.daum.net/v/65139429"
[debug] System config: []
[debug] User config: [u'--no-mtime', u'-o', u'/Users/ping/Downloads/%(title)s_%(id)s.%(ext)s']
[debug] Command-line args: [u'-v', u'http://m.tvpot.daum.net/v/65139429']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.01.23
[debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.6.2, ffprobe 2.6.2, rtmpdump 2.4
[debug] Proxy map: {}
[daum.net] 65139429: Downloading video info
[daum.net] 65139429: Downloading video formats info
ERROR: An extractor error has occurred. (caused by KeyError(u'output_list',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 313, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/daum.py", line 46, in _real_extract
    for format_el in movie_data['output_list']['output_list']:
KeyError: u'output_list'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 666, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 319, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
ExtractorError: An extractor error has occurred. (caused by KeyError(u'output_list',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
```



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/daum.py b/youtube_dl/extractor/daum.py
--- a/youtube_dl/extractor/daum.py
+++ b/youtube_dl/extractor/daum.py
@@ -2,6 +2,8 @@
 
 from __future__ import unicode_literals
 
+import re
+
 from .common import InfoExtractor
 from ..compat import compat_urllib_parse
 from ..utils import (
@@ -27,6 +29,18 @@ class DaumIE(InfoExtractor):
             'view_count': int,
             'comment_count': int,
         },
+    }, {
+        'url': 'http://m.tvpot.daum.net/v/65139429',
+        'info_dict': {
+            'id': '65139429',
+            'ext': 'mp4',
+            'title': 'md5:a100d65d09cec246d8aa9bde7de45aed',
+            'description': 'md5:79794514261164ff27e36a21ad229fc5',
+            'upload_date': '20150604',
+            'duration': 154,
+            'view_count': int,
+            'comment_count': int,
+        },
     }, {
         'url': 'http://tvpot.daum.net/v/07dXWRka62Y%24',
         'only_matching': True,
@@ -42,6 +56,10 @@ def _real_extract(self, url):
             'http://videofarm.daum.net/controller/api/closed/v1_2/IntegratedMovieData.json?' + query,
             video_id, 'Downloading video formats info')
 
+        # For urls like http://m.tvpot.daum.net/v/65139429, where the video_id is really a clipid
+        if not movie_data.get('output_list', {}).get('output_list') and re.match(r'^\d+$', video_id):
+            return self.url_result('http://tvpot.daum.net/clip/ClipView.do?clipid=%s' % video_id)
+
         formats = []
         for format_el in movie_data['output_list']['output_list']:
             profile = format_el['profile']
@@ -76,7 +94,7 @@ def _real_extract(self, url):
 
 
 class DaumClipIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:m\.)?tvpot\.daum\.net/(?:clip/ClipView.do|mypot/View.do)\?.*?clipid=(?P<id>\d+)'
+    _VALID_URL = r'https?://(?:m\.)?tvpot\.daum\.net/(?:clip/ClipView.(?:do|tv)|mypot/View.do)\?.*?clipid=(?P<id>\d+)'
     IE_NAME = 'daum.net:clip'
 
     _TESTS = [{
@@ -90,6 +108,9 @@ class DaumClipIE(InfoExtractor):
             'duration': 3868,
             'view_count': int,
         },
+    }, {
+        'url': 'http://m.tvpot.daum.net/clip/ClipView.tv?clipid=54999425',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):


Test patch: