- mobj = re.match(self._VALID_URL, url)
- showName = mobj.group('showname')
- video_id = mobj.group('id')
-
- self.report_extraction(video_id)
- webpage = self._download_webpage(url, video_id)
-
- videoDesc = self._html_search_regex(
- r'<meta name="description" content="([^"]*)"',
- webpage, 'description', fatal=False)
-
- playerUrl = self._og_search_video_url(webpage, name='player URL')
-
- title = self._html_search_regex(
- r'<meta name="title" content="([^"]*)"',
- webpage, 'title').split(' : ')[-1]
-
- configUrl = self._search_regex('config=(.*)$', playerUrl, 'config URL')
- configUrl = compat_urllib_parse.unquote(configUrl)
+ video_id = self._match_id(url)
+ webpage_req = compat_urllib_request.Request(url)
+ webpage_req.add_header('User-Agent', self._USER_AGENT)
+ webpage = self._download_webpage(webpage_req, video_id)
+
+ uploader_id = self._html_search_regex(
+ r"<h1\s+class='headline'>\s*<a\s+href='/videos/view/(.*?)'",
+ webpage, 'uploader ID', fatal=False)
+ uploader = self._html_search_regex(
+ r"<h1\s+class='headline'>(.*?)</a>",
+ webpage, 'uploader', fatal=False)
+ description = self._html_search_meta('description', webpage)
+ duration = parse_duration(self._html_search_meta('duration', webpage))
+
+ raw_title = self._html_search_meta('title', webpage, fatal=True)
+ title = raw_title.partition(' : ')[2]
+
+ config_url = compat_urllib_parse.unquote(self._html_search_regex(
+ r'''(?x)
+ (?:
+ <param\s+name="flashvars".*?\s+value="config=|
+ flashvars="config=
+ )
+ (https?://[^"&]+)
+ ''',
+ webpage, 'config URL'))