1 from .brightcove
import BrightcoveNewIE
2 from .common
import InfoExtractor
5 class PGATourIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?pgatour\.com/video/[\w-]+/(?P<tc>T)?(?P<id>\d+)'
8 'url': 'https://www.pgatour.com/video/competition/T6322447785112/adam-hadwin-2023-the-players-round-4-18th-hole-shot-1',
10 'id': '6322447785112',
12 'title': 'Adam Hadwin | 2023 THE PLAYERS | Round 4 | 18th hole | Shot 1',
13 'uploader_id': '6116716431001',
14 'upload_date': '20230312',
15 'timestamp': 1678653136,
17 'thumbnail': r
're:^https://.+\.jpg',
20 'params': {'skip_download': 'm3u8'},
22 'url': 'https://www.pgatour.com/video/features/6322506425112/follow-the-players-trophy-on-championship-sunday',
24 'id': '6322506425112',
26 'title': 'Follow THE PLAYERS trophy on Championship Sunday',
27 'description': 'md5:4d29e4bdfa03694a0ebfd08950398568',
28 'uploader_id': '6082840763001',
29 'upload_date': '20230313',
30 'timestamp': 1678739835,
32 'thumbnail': r
're:^https://.+\.jpg',
35 'params': {'skip_download': 'm3u8'},
38 def _real_extract(self
, url
):
39 video_id
, is_tourcast
= self
._match
_valid
_url
(url
).group('id', 'tc')
41 # From https://www.pgatour.com/_next/static/chunks/pages/_app-8bcf849560daf38d.js
42 account_id
= '6116716431001' if is_tourcast
else '6082840763001'
43 player_id
= 'Vsd5Umu8r' if is_tourcast
else 'FWIBYMBPj'
45 return self
.url_result(
46 f
'https://players.brightcove.net/{account_id}/{player_id}_default/index.html?videoId={video_id}',