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