1 from .brightcove
import BrightcoveNewIE
2 from .common
import InfoExtractor
3 from ..utils
import url_or_none
4 from ..utils
.traversal
import traverse_obj
7 class DrTalksIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?drtalks\.com/videos/(?P<id>[\w-]+)'
10 'url': 'https://drtalks.com/videos/six-pillars-of-resilience-tools-for-managing-stress-and-flourishing/',
12 'id': '6366193757112',
14 'uploader_id': '6314452011001',
15 'tags': ['resilience'],
16 'description': 'md5:9c6805aee237ee6de8052461855b9dda',
17 'timestamp': 1734546659,
18 'thumbnail': 'https://drtalks.com/wp-content/uploads/2024/12/Episode-82-Eva-Selhub-DrTalks-Thumbs.jpg',
19 'title': 'Six Pillars of Resilience: Tools for Managing Stress and Flourishing',
21 'upload_date': '20241218',
24 'url': 'https://drtalks.com/videos/the-pcos-puzzle-mastering-metabolic-health-with-marcelle-pick/',
26 'id': '6364699891112',
28 'title': 'The PCOS Puzzle: Mastering Metabolic Health with Marcelle Pick',
29 'description': 'md5:e87cbe00ca50135d5702787fc4043aaa',
30 'thumbnail': 'https://drtalks.com/wp-content/uploads/2024/11/Episode-34-Marcelle-Pick-OBGYN-NP-DrTalks.jpg',
33 'upload_date': '20241114',
34 'timestamp': 1731592119,
35 'uploader_id': '6314452011001',
39 def _real_extract(self
, url
):
40 video_id
= self
._match
_id
(url
)
41 webpage
= self
._download
_webpage
(url
, video_id
)
42 next_data
= self
._search
_nextjs
_data
(webpage
, video_id
)['props']['pageProps']['data']['video']
44 return self
.url_result(
45 next_data
['videos']['brightcoveVideoLink'], BrightcoveNewIE
, video_id
,
47 **traverse_obj(next_data
, {
48 'title': ('title', {str}
),
49 'description': ('videos', 'summury', {str}
),
50 'thumbnail': ('featuredImage', 'node', 'sourceUrl', {url_or_none}
),