- mobj = re.match(self._VALID_URL, url)
- title = mobj.group('title')
-
- webpage = self._download_webpage(url, title)
-
- article_id = self._html_search_regex(r"<article id=\"post-(\d+)\"", webpage, '0')
- title = self._html_search_regex(r'<h1 class=\"entry-title\">(.*?)</h1>', webpage, 'title')
- description = self._html_search_regex(r"property=\"og:description\" content=\"(.*?)\"", webpage, 'description', fatal=False)
-
- rtmp_url = self._html_search_regex(r"file: \"(rtmp://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d{1,5}/vod/mp4:\" \+ \"\w+\" \+ \".mp4)\"", webpage, 'url')
- rtmp_url = rtmp_url.replace("\" + \"", "")
-
- return {
- 'id': article_id,
- 'title': title,
- 'description': description,
- 'url': rtmp_url,
- 'ext': 'flv',
- 'rtmp_live': True # if rtmpdump is not called with "--live" argument, the download is blocked and can be completed
- }
\ No newline at end of file
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+
+ article_id = self._html_search_regex(
+ r"<article id=\"post-(\d+)\"", webpage, 'article ID', default=None)
+ title = self._html_search_regex(
+ r'<h1 class=\"entry-title\">(.*?)</h1>', webpage, 'title')
+ description = self._og_search_description(webpage, default=None)
+
+ rtmp_url = self._html_search_regex(
+ r'file\s*:\s*"(rtmp://[^/]+/vod/mp4:"\s*\+\s*"[^"]+"\s*\+\s*".mp4)"',
+ webpage, 'RTMP url')
+ rtmp_url = re.sub(r'"\s*\+\s*"', '', rtmp_url)
+ formats = self._extract_wowza_formats(rtmp_url, article_id or display_id)
+ self._sort_formats(formats)
+
+ return {
+ 'id': article_id or display_id,
+ 'display_id': display_id,
+ 'title': title,
+ 'description': description,
+ 'formats': formats,
+ }