]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/tele5.py
33a72083bff96a74e04020257ba3305d1cfee2ca
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from .nexx
import NexxIE
6 from ..compat
import compat_urlparse
9 class Tele5IE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?tele5\.de/(?:[^/]+/)*(?P<id>[^/?#&]+)'
12 'url': 'https://www.tele5.de/mediathek/filme-online/videos?vid=1549416',
16 'upload_date': '20180814',
17 'timestamp': 1534290623,
21 'skip_download': True,
24 'url': 'https://www.tele5.de/kalkofes-mattscheibe/video-clips/politik-und-gesellschaft?ve_id=1551191',
25 'only_matching': True,
27 'url': 'https://www.tele5.de/video-clip/?ve_id=1609440',
28 'only_matching': True,
30 'url': 'https://www.tele5.de/filme/schlefaz-dragon-crusaders/',
31 'only_matching': True,
33 'url': 'https://www.tele5.de/filme/making-of/avengers-endgame/',
34 'only_matching': True,
36 'url': 'https://www.tele5.de/star-trek/raumschiff-voyager/ganze-folge/das-vinculum/',
37 'only_matching': True,
39 'url': 'https://www.tele5.de/anders-ist-sevda/',
40 'only_matching': True,
43 def _real_extract(self
, url
):
44 qs
= compat_urlparse
.parse_qs(compat_urlparse
.urlparse(url
).query
)
45 video_id
= (qs
.get('vid') or qs
.get('ve_id') or [None])[0]
48 display_id
= self
._match
_id
(url
)
49 webpage
= self
._download
_webpage
(url
, display_id
)
50 video_id
= self
._html
_search
_regex
(
51 (r
'id\s*=\s*["\']video
-player
["\'][^>]+data-id\s*=\s*["\'](\d
+)',
52 r'\s
+id\s
*=\s
*["\']player_(\d{6,})',
53 r'\bdata-id\s*=\s*["\'](\d
{6,})'), webpage, 'video
id')
55 return self.url_result(
56 'https
://api
.nexx
.cloud
/v3
/759/videos
/byid
/%s' % video_id,
57 ie=NexxIE.ie_key(), video_id=video_id)