You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
884 B

  1. from __future__ import unicode_literals
  2. import re
  3. from .common import InfoExtractor
  4. from .fivemin import FiveMinIE
  5. class AolIE(InfoExtractor):
  6. IE_NAME = 'on.aol.com'
  7. _VALID_URL = r'http://on\.aol\.com/video/.*-(?P<id>\d+)($|\?)'
  8. _TEST = {
  9. 'url': 'http://on.aol.com/video/u-s--official-warns-of-largest-ever-irs-phone-scam-518167793?icid=OnHomepageC2Wide_MustSee_Img',
  10. 'md5': '18ef68f48740e86ae94b98da815eec42',
  11. 'info_dict': {
  12. 'id': '518167793',
  13. 'ext': 'mp4',
  14. 'title': 'U.S. Official Warns Of \'Largest Ever\' IRS Phone Scam',
  15. },
  16. 'add_ie': ['FiveMin'],
  17. }
  18. def _real_extract(self, url):
  19. mobj = re.match(self._VALID_URL, url)
  20. video_id = mobj.group('id')
  21. self.to_screen('Downloading 5min.com video %s' % video_id)
  22. return FiveMinIE._build_result(video_id)