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.

27 lines
889 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. 'md5': 'e07de1d52c7278adbb9b9b1c93a66849',
  9. 'info_dict': {
  10. 'id': 'NmqMrGnXvmO1',
  11. 'ext': 'flv',
  12. 'title': 'George Lucas has Advice for his Daughter',
  13. 'description': 'Listen to what insights George Lucas give his daughter Amanda.',
  14. },
  15. 'add_ie': ['ThePlatform'],
  16. }
  17. def _real_extract(self, url):
  18. mobj = re.match(self._VALID_URL, url)
  19. video_id = mobj.group('id')
  20. webpage = self._download_webpage(url, video_id)
  21. return self.url_result(self._og_search_video_url(webpage))