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.

33 lines
1.1 KiB

  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. from .vice import ViceBaseIE
  4. class VicelandIE(ViceBaseIE):
  5. _VALID_URL = r'https?://(?:www\.)?viceland\.com/[^/]+/video/[^/]+/(?P<id>[a-f0-9]+)'
  6. _TEST = {
  7. 'url': 'https://www.viceland.com/en_us/video/trapped/588a70d0dba8a16007de7316',
  8. 'info_dict': {
  9. 'id': '588a70d0dba8a16007de7316',
  10. 'ext': 'mp4',
  11. 'title': 'TRAPPED (Series Trailer)',
  12. 'description': 'md5:7a8e95c2b6cd86461502a2845e581ccf',
  13. 'age_limit': 14,
  14. 'timestamp': 1485474122,
  15. 'upload_date': '20170126',
  16. 'uploader_id': '57a204098cb727dec794c6a3',
  17. 'uploader': 'Viceland',
  18. },
  19. 'params': {
  20. # m3u8 download
  21. 'skip_download': True,
  22. },
  23. 'add_ie': ['UplynkPreplay'],
  24. }
  25. _PREPLAY_HOST = 'www.viceland'
  26. def _real_extract(self, url):
  27. video_id = self._match_id(url)
  28. webpage = self._download_webpage(url, video_id)
  29. return self._extract_preplay_video(url, webpage)