1 from .common
import InfoExtractor
8 class RockstarGamesIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?rockstargames\.com/videos(?:/video/|#?/?\?.*\bvideo=)(?P<id>\d+)'
12 'url': 'https://www.rockstargames.com/videos/video/11544/',
13 'md5': '03b5caa6e357a4bd50e3143fc03e5733',
17 'title': 'Further Adventures in Finance and Felony Trailer',
18 'description': 'md5:6d31f55f30cb101b5476c4a379e324a3',
19 'thumbnail': r
're:^https?://.*\.jpg$',
20 'timestamp': 1464876000,
21 'upload_date': '20160602',
24 'url': 'http://www.rockstargames.com/videos#/?video=48',
25 'only_matching': True,
28 def _real_extract(self
, url
):
29 video_id
= self
._match
_id
(url
)
31 video
= self
._download
_json
(
32 'https://www.rockstargames.com/videoplayer/videos/get-video.json',
38 title
= video
['title']
41 for v
in video
['files_processed']['video/mp4']:
44 resolution
= v
.get('resolution')
45 height
= int_or_none(self
._search
_regex
(
46 r
'^(\d+)[pP]$', resolution
or '', 'height', default
=None))
48 'url': self
._proto
_relative
_url
(v
['src']),
49 'format_id': resolution
,
54 youtube_id
= video
.get('youtube_id')
56 return self
.url_result(youtube_id
, 'Youtube')
61 'description': video
.get('description'),
62 'thumbnail': self
._proto
_relative
_url
(video
.get('screencap')),
63 'timestamp': parse_iso8601(video
.get('created')),