prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  cannot download Daum tvpot url
  cannot download video from Daum tvpot which is Korean internet portal service
  http://tvpot.daum.net/v/vfb45BtrWBWWHKEkOwXEghB
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `youtube_dl/extractor/daum.py`
  Content:
  ```
  1 # encoding: utf-8
  2 
  3 from __future__ import unicode_literals
  4 
  5 import re
  6 
  7 from .common import InfoExtractor
  8 from ..compat import (
  9     compat_urllib_parse,
  10 )
  11 
  12 
  13 class DaumIE(InfoExtractor):
  14     _VALID_URL = r'https?://(?:m\.)?tvpot\.daum\.net/(?:v/|.*?clipid=)(?P<id>[^?#&]+)'
  15     IE_NAME = 'daum.net'
  16 
  17     _TESTS = [{
  18         'url': 'http://tvpot.daum.net/clip/ClipView.do?clipid=52554690',
  19         'info_dict': {
  20             'id': '52554690',
  21             'ext': 'mp4',
  22             'title': 'DOTA 2GETHER 시즌2 6회 - 2부',
  23             'description': 'DOTA 2GETHER 시즌2 6회 - 2부',
  24             'upload_date': '20130831',
  25             'duration': 3868,
  26         },
  27     }, {
  28         'url': 'http://tvpot.daum.net/v/vab4dyeDBysyBssyukBUjBz',
  29         'only_matching': True,
  30     }, {
  31         'url': 'http://tvpot.daum.net/v/07dXWRka62Y%24',
  32         'only_matching': True,
  33     }]
  34 
  35     def _real_extract(self, url):
  36         mobj = re.match(self._VALID_URL, url)
  37         video_id = mobj.group('id')
  38         canonical_url = 'http://tvpot.daum.net/v/%s' % video_id
  39         webpage = self._download_webpage(canonical_url, video_id)
  40         full_id = self._search_regex(
  41             r'<iframe src="http://videofarm.daum.net/controller/video/viewer/Video.html\?.*?vid=(.+?)[&"]',
  42             webpage, 'full id')
  43         query = compat_urllib_parse.urlencode({'vid': full_id})
  44         info = self._download_xml(
  45             'http://tvpot.daum.net/clip/ClipInfoXml.do?' + query, video_id,
  46             'Downloading video info')
  47         urls = self._download_xml(
  48             'http://videofarm.daum.net/controller/api/open/v1_2/MovieData.apixml?' + query,
  49             video_id, 'Downloading video formats info')
  50 
  51         formats = []
  52         for format_el in urls.findall('result/output_list/output_list'):
  53             profile = format_el.attrib['profile']
  54             format_query = compat_urllib_parse.urlencode({
  55                 'vid': full_id,
  56                 'profile': profile,
  57             })
  58             url_doc = self._download_xml(
  59                 'http://videofarm.daum.net/controller/api/open/v1_2/MovieLocation.apixml?' + format_query,
  60                 video_id, note='Downloading video data for %s format' % profile)
  61             format_url = url_doc.find('result/url').text
  62             formats.append({
  63                 'url': format_url,
  64                 'format_id': profile,
  65             })
  66 
  67         return {
  68             'id': video_id,
  69             'title': info.find('TITLE').text,
  70             'formats': formats,
  71             'thumbnail': self._og_search_thumbnail(webpage),
  72             'description': info.find('CONTENTS').text,
  73             'duration': int(info.find('DURATION').text),
  74             'upload_date': info.find('REGDTTM').text[:8],
  75         }
  76
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: 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
  @@ -38,7 +38,7 @@
           canonical_url = 'http://tvpot.daum.net/v/%s' % video_id
           webpage = self._download_webpage(canonical_url, video_id)
           full_id = self._search_regex(
  -            r'<iframe src="http://videofarm.daum.net/controller/video/viewer/Video.html\?.*?vid=(.+?)[&"]',
  +            r'src=["\']http://videofarm.daum.net/controller/video/viewer/Video.html\?.*?vid=(.+?)[&"\']',
               webpage, 'full id')
           query = compat_urllib_parse.urlencode({'vid': full_id})
           info = self._download_xml(
  
verification_info: {"golden_diff": "diff --git a/youtube_dl/extractor/daum.py b/youtube_dl/extractor/daum.py\n--- a/youtube_dl/extractor/daum.py\n+++ b/youtube_dl/extractor/daum.py\n@@ -38,7 +38,7 @@\n         canonical_url = 'http://tvpot.daum.net/v/%s' % video_id\n         webpage = self._download_webpage(canonical_url, video_id)\n         full_id = self._search_regex(\n-            r'<iframe src=\"http://videofarm.daum.net/controller/video/viewer/Video.html\\?.*?vid=(.+?)[&\"]',\n+            r'src=[\"\\']http://videofarm.daum.net/controller/video/viewer/Video.html\\?.*?vid=(.+?)[&\"\\']',\n             webpage, 'full id')\n         query = compat_urllib_parse.urlencode({'vid': full_id})\n         info = self._download_xml(\n", "issue": "cannot download Daum tvpot url\ncannot download video from Daum tvpot which is Korean internet portal service\nhttp://tvpot.daum.net/v/vfb45BtrWBWWHKEkOwXEghB\n\n", "before_files": [{"content": "# encoding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n    compat_urllib_parse,\n)\n\n\nclass DaumIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:m\\.)?tvpot\\.daum\\.net/(?:v/|.*?clipid=)(?P<id>[^?#&]+)'\n    IE_NAME = 'daum.net'\n\n    _TESTS = [{\n        'url': 'http://tvpot.daum.net/clip/ClipView.do?clipid=52554690',\n        'info_dict': {\n            'id': '52554690',\n            'ext': 'mp4',\n            'title': 'DOTA 2GETHER \uc2dc\uc98c2 6\ud68c - 2\ubd80',\n            'description': 'DOTA 2GETHER \uc2dc\uc98c2 6\ud68c - 2\ubd80',\n            'upload_date': '20130831',\n            'duration': 3868,\n        },\n    }, {\n        'url': 'http://tvpot.daum.net/v/vab4dyeDBysyBssyukBUjBz',\n        'only_matching': True,\n    }, {\n        'url': 'http://tvpot.daum.net/v/07dXWRka62Y%24',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        video_id = mobj.group('id')\n        canonical_url = 'http://tvpot.daum.net/v/%s' % video_id\n        webpage = self._download_webpage(canonical_url, video_id)\n        full_id = self._search_regex(\n            r'<iframe src=\"http://videofarm.daum.net/controller/video/viewer/Video.html\\?.*?vid=(.+?)[&\"]',\n            webpage, 'full id')\n        query = compat_urllib_parse.urlencode({'vid': full_id})\n        info = self._download_xml(\n            'http://tvpot.daum.net/clip/ClipInfoXml.do?' + query, video_id,\n            'Downloading video info')\n        urls = self._download_xml(\n            'http://videofarm.daum.net/controller/api/open/v1_2/MovieData.apixml?' + query,\n            video_id, 'Downloading video formats info')\n\n        formats = []\n        for format_el in urls.findall('result/output_list/output_list'):\n            profile = format_el.attrib['profile']\n            format_query = compat_urllib_parse.urlencode({\n                'vid': full_id,\n                'profile': profile,\n            })\n            url_doc = self._download_xml(\n                'http://videofarm.daum.net/controller/api/open/v1_2/MovieLocation.apixml?' + format_query,\n                video_id, note='Downloading video data for %s format' % profile)\n            format_url = url_doc.find('result/url').text\n            formats.append({\n                'url': format_url,\n                'format_id': profile,\n            })\n\n        return {\n            'id': video_id,\n            'title': info.find('TITLE').text,\n            'formats': formats,\n            'thumbnail': self._og_search_thumbnail(webpage),\n            'description': info.find('CONTENTS').text,\n            'duration': int(info.find('DURATION').text),\n            'upload_date': info.find('REGDTTM').text[:8],\n        }\n", "path": "youtube_dl/extractor/daum.py"}], "after_files": [{"content": "# encoding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n    compat_urllib_parse,\n)\n\n\nclass DaumIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:m\\.)?tvpot\\.daum\\.net/(?:v/|.*?clipid=)(?P<id>[^?#&]+)'\n    IE_NAME = 'daum.net'\n\n    _TESTS = [{\n        'url': 'http://tvpot.daum.net/clip/ClipView.do?clipid=52554690',\n        'info_dict': {\n            'id': '52554690',\n            'ext': 'mp4',\n            'title': 'DOTA 2GETHER \uc2dc\uc98c2 6\ud68c - 2\ubd80',\n            'description': 'DOTA 2GETHER \uc2dc\uc98c2 6\ud68c - 2\ubd80',\n            'upload_date': '20130831',\n            'duration': 3868,\n        },\n    }, {\n        'url': 'http://tvpot.daum.net/v/vab4dyeDBysyBssyukBUjBz',\n        'only_matching': True,\n    }, {\n        'url': 'http://tvpot.daum.net/v/07dXWRka62Y%24',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        video_id = mobj.group('id')\n        canonical_url = 'http://tvpot.daum.net/v/%s' % video_id\n        webpage = self._download_webpage(canonical_url, video_id)\n        full_id = self._search_regex(\n            r'src=[\"\\']http://videofarm.daum.net/controller/video/viewer/Video.html\\?.*?vid=(.+?)[&\"\\']',\n            webpage, 'full id')\n        query = compat_urllib_parse.urlencode({'vid': full_id})\n        info = self._download_xml(\n            'http://tvpot.daum.net/clip/ClipInfoXml.do?' + query, video_id,\n            'Downloading video info')\n        urls = self._download_xml(\n            'http://videofarm.daum.net/controller/api/open/v1_2/MovieData.apixml?' + query,\n            video_id, 'Downloading video formats info')\n\n        formats = []\n        for format_el in urls.findall('result/output_list/output_list'):\n            profile = format_el.attrib['profile']\n            format_query = compat_urllib_parse.urlencode({\n                'vid': full_id,\n                'profile': profile,\n            })\n            url_doc = self._download_xml(\n                'http://videofarm.daum.net/controller/api/open/v1_2/MovieLocation.apixml?' + format_query,\n                video_id, note='Downloading video data for %s format' % profile)\n            format_url = url_doc.find('result/url').text\n            formats.append({\n                'url': format_url,\n                'format_id': profile,\n            })\n\n        return {\n            'id': video_id,\n            'title': info.find('TITLE').text,\n            'formats': formats,\n            'thumbnail': self._og_search_thumbnail(webpage),\n            'description': info.find('CONTENTS').text,\n            'duration': int(info.find('DURATION').text),\n            'upload_date': info.find('REGDTTM').text[:8],\n        }\n", "path": "youtube_dl/extractor/daum.py"}]}