- mobj = re.match(self._VALID_URL, url)
- showName = mobj.group('showname')
- videoId = mobj.group('episode')
-
- self.report_extraction(videoId)
- webpage = self._download_webpage(url, videoId)
-
- videoDesc = self._html_search_regex(
- r'<meta name="description" content="([^"]*)"',
- webpage, u'description', fatal=False)
-
- playerUrl = self._og_search_video_url(webpage, name=u'player URL')
-
- title = self._html_search_regex(
- r'<meta name="title" content="([^"]*)"',
- webpage, u'title').split(' : ')[-1]
-
- configUrl = self._search_regex('config=(.*)$', playerUrl, u'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'))