1 from __future__ import unicode_literals
5 from .common import InfoExtractor
6 from .fivemin import FiveMinIE
9 class AolIE(InfoExtractor):
10 IE_NAME = 'on.aol.com'
17 playlist/(?P<playlist_display_id>[^/?#]+?)-(?P<playlist_id>[0-9]+)[?#].*_videoid=
25 'url': 'http://on.aol.com/video/u-s--official-warns-of-largest-ever-irs-phone-scam-518167793?icid=OnHomepageC2Wide_MustSee_Img',
26 'md5': '18ef68f48740e86ae94b98da815eec42',
30 'title': 'U.S. Official Warns Of \'Largest Ever\' IRS Phone Scam',
32 'add_ie': ['FiveMin'],
35 def _real_extract(self, url):
36 mobj = re.match(self._VALID_URL, url)
37 video_id = mobj.group('id')
39 playlist_id = mobj.group('playlist_id')
40 if playlist_id and not self._downloader.params.get('noplaylist'):
41 self.to_screen('Downloading playlist %s - add --no-playlist to just download video %s' % (playlist_id, video_id))
43 webpage = self._download_webpage(url, playlist_id)
44 title = self._html_search_regex(
45 r'<h1 class="video-title[^"]*">(.+?)</h1>', webpage, 'title')
46 playlist_html = self._search_regex(
47 r"(?s)<ul\s+class='video-related[^']*'>(.*?)</ul>", webpage,
51 'url': 'aol-video:%s' % m.group('id'),
53 } for m in re.finditer(
54 r"<a\s+href='.*videoid=(?P<id>[0-9]+)'\s+class='video-thumb'>",
60 'display_id': mobj.group('playlist_display_id'),
65 return FiveMinIE._build_result(video_id)