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.2 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/cyberwar-trailer/57608447973ee7705f6fbd4e',
  8. 'info_dict': {
  9. 'id': '57608447973ee7705f6fbd4e',
  10. 'ext': 'mp4',
  11. 'title': 'CYBERWAR (Trailer)',
  12. 'description': 'Tapping into the geopolitics of hacking and surveillance, Ben Makuch travels the world to meet with hackers, government officials, and dissidents to investigate the ecosystem of cyberwarfare.',
  13. 'age_limit': 14,
  14. 'timestamp': 1466008539,
  15. 'upload_date': '20160615',
  16. 'uploader_id': '11',
  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)