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.

30 lines
931 B

  1. from __future__ import unicode_literals
  2. import re
  3. from .common import InfoExtractor
  4. class SyfyIE(InfoExtractor):
  5. _VALID_URL = r'https?://www\.syfy\.com/videos/.+?vid:(?P<id>\d+)'
  6. _TEST = {
  7. 'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/Behind%20the%20Scenes/vid:2631458',
  8. 'info_dict': {
  9. 'id': 'NmqMrGnXvmO1',
  10. 'ext': 'flv',
  11. 'title': 'George Lucas has Advice for his Daughter',
  12. 'description': 'Listen to what insights George Lucas give his daughter Amanda.',
  13. },
  14. 'params': {
  15. # f4m download
  16. 'skip_download': True,
  17. },
  18. 'add_ie': ['ThePlatform'],
  19. }
  20. def _real_extract(self, url):
  21. mobj = re.match(self._VALID_URL, url)
  22. video_id = mobj.group('id')
  23. webpage = self._download_webpage(url, video_id)
  24. return self.url_result(self._og_search_video_url(webpage))