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.

26 lines
892 B

11 years ago
11 years ago
11 years ago
11 years ago
  1. from __future__ import unicode_literals
  2. from .nuevo import NuevoBaseIE
  3. class TruTubeIE(NuevoBaseIE):
  4. _VALID_URL = r'https?://(?:www\.)?trutube\.tv/(?:video/|nuevo/player/embed\.php\?v=)(?P<id>\d+)'
  5. _TESTS = [{
  6. 'url': 'http://trutube.tv/video/14880/Ramses-II-Proven-To-Be-A-Red-Headed-Caucasoid-',
  7. 'md5': 'c5b6e301b0a2040b074746cbeaa26ca1',
  8. 'info_dict': {
  9. 'id': '14880',
  10. 'ext': 'flv',
  11. 'title': 'Ramses II - Proven To Be A Red Headed Caucasoid',
  12. 'thumbnail': 're:^http:.*\.jpg$',
  13. }
  14. }, {
  15. 'url': 'https://trutube.tv/nuevo/player/embed.php?v=14880',
  16. 'only_matching': True,
  17. }]
  18. def _real_extract(self, url):
  19. video_id = self._match_id(url)
  20. return self._extract_nuevo(
  21. 'https://trutube.tv/nuevo/player/config.php?v=%s' % video_id,
  22. video_id)