1 from .common
import InfoExtractor
2 from .dailymotion
import DailymotionIE
3 from .youtube
import YoutubeIE
6 class GMANetworkVideoIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www)\.gmanetwork\.com/(?:\w+/){3}(?P<id>\d+)/(?P<display_id>[\w-]+)/video'
9 'url': 'https://www.gmanetwork.com/fullepisodes/home/running_man_philippines/168677/running-man-philippines-catch-the-thief-full-chapter-2/video?section=home',
13 'upload_date': '20220919',
14 'uploader_url': 'http://www.youtube.com/channel/UChsoPNR5x-wdSO2GrOSIWqQ',
18 'channel_id': 'UChsoPNR5x-wdSO2GrOSIWqQ',
22 'uploader_id': 'UChsoPNR5x-wdSO2GrOSIWqQ',
23 'title': 'Running Man Philippines: Catch the Thief (FULL CHAPTER 2)',
24 'channel_url': 'https://www.youtube.com/channel/UChsoPNR5x-wdSO2GrOSIWqQ',
25 'thumbnail': 'https://i.ytimg.com/vi/28BqW0AXPe0/maxresdefault.jpg',
26 'release_timestamp': 1663594212,
28 'channel_follower_count': int,
29 'categories': ['Entertainment'],
30 'description': 'md5:811bdcea74f9c48051824e494756e926',
31 'live_status': 'not_live',
32 'playable_in_embed': True,
34 'availability': 'public',
35 'release_date': '20220919',
38 'url': 'https://www.gmanetwork.com/fullepisodes/home/more_than_words/87059/more-than-words-full-episode-80/video?section=home',
42 'live_status': 'not_live',
43 'channel': 'GMANetwork',
45 'channel_follower_count': int,
46 'description': 'md5:6d00cd658394fa1a5071200d3ed4be05',
50 'upload_date': '20181003',
51 'thumbnail': 'https://i.ytimg.com/vi_webp/yiDOExw2aSA/maxresdefault.webp',
52 'availability': 'public',
53 'playable_in_embed': True,
54 'channel_id': 'UCKL5hAuzgFQsyrsQKgU0Qng',
55 'title': 'More Than Words: Full Episode 80 (Finale)',
56 'uploader_id': 'GMANETWORK',
57 'categories': ['Entertainment'],
58 'uploader': 'GMANetwork',
59 'channel_url': 'https://www.youtube.com/channel/UCKL5hAuzgFQsyrsQKgU0Qng',
62 'uploader_url': 'http://www.youtube.com/user/GMANETWORK',
66 def _real_extract(self
, url
):
67 content_id
, display_id
= self
._match
_valid
_url
(url
).group('id', 'display_id')
68 webpage
= self
._download
_webpage
(url
, display_id
)
70 youtube_id
= self
._search
_regex
(
71 r
'var\s*YOUTUBE_VIDEO\s*=\s*[\'"]+(?P<yt_id>[\w-]+)', webpage, 'youtube_id', fatal=False)
73 return self.url_result(youtube_id, YoutubeIE, youtube_id)
76 # more info at https://aphrodite.gmanetwork.com/fullepisodes/assets/fullepisodes/js/dist/fullepisodes_video.js?v=1.1.11
77 network_url = self._search_regex(
78 r'NETWORK_URL\s*=\s*[\'"](?P
<url
>[^
\'"]+)', webpage, 'network_url')
79 json_data = self._download_json(f'{network_url}api/data/content/video/{content_id}', display_id)
80 if json_data.get('video_file'):
81 return self.url_result(json_data['video_file'], YoutubeIE, json_data['video_file'])
83 return self.url_result(json_data['dailymotion_file'], DailymotionIE, json_data['dailymotion_file'])