mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[extractor/skyit] Fix extractors (#5442)
Closes #5392 Authored by: nixxo
This commit is contained in:
		| @@ -1640,7 +1640,6 @@ from .skyit import ( | |||||||
|     SkyItVideoIE, |     SkyItVideoIE, | ||||||
|     SkyItVideoLiveIE, |     SkyItVideoLiveIE, | ||||||
|     SkyItIE, |     SkyItIE, | ||||||
|     SkyItAcademyIE, |  | ||||||
|     SkyItArteIE, |     SkyItArteIE, | ||||||
|     CieloTVItIE, |     CieloTVItIE, | ||||||
|     TV8ItIE, |     TV8ItIE, | ||||||
|   | |||||||
| @@ -25,7 +25,6 @@ class SkyItPlayerIE(InfoExtractor): | |||||||
|         'salesforce': 'C6D585FD1615272C98DE38235F38BD86', |         'salesforce': 'C6D585FD1615272C98DE38235F38BD86', | ||||||
|         'sitocommerciale': 'VJwfFuSGnLKnd9Phe9y96WkXgYDCguPMJ2dLhGMb2RE', |         'sitocommerciale': 'VJwfFuSGnLKnd9Phe9y96WkXgYDCguPMJ2dLhGMb2RE', | ||||||
|         'sky': 'F96WlOd8yoFmLQgiqv6fNQRvHZcsWk5jDaYnDvhbiJk', |         'sky': 'F96WlOd8yoFmLQgiqv6fNQRvHZcsWk5jDaYnDvhbiJk', | ||||||
|         'skyacademy': 'A6LAn7EkO2Q26FRy0IAMBekX6jzDXYL3', |  | ||||||
|         'skyarte': 'LWk29hfiU39NNdq87ePeRach3nzTSV20o0lTv2001Cd', |         'skyarte': 'LWk29hfiU39NNdq87ePeRach3nzTSV20o0lTv2001Cd', | ||||||
|         'theupfront': 'PRSGmDMsg6QMGc04Obpoy7Vsbn7i2Whp', |         'theupfront': 'PRSGmDMsg6QMGc04Obpoy7Vsbn7i2Whp', | ||||||
|     } |     } | ||||||
| @@ -42,11 +41,7 @@ class SkyItPlayerIE(InfoExtractor): | |||||||
|         if not hls_url and video.get('geoblock' if is_live else 'geob'): |         if not hls_url and video.get('geoblock' if is_live else 'geob'): | ||||||
|             self.raise_geo_restricted(countries=['IT']) |             self.raise_geo_restricted(countries=['IT']) | ||||||
| 
 | 
 | ||||||
|         if is_live: |         formats = self._extract_m3u8_formats(hls_url, video_id, 'mp4') | ||||||
|             formats = self._extract_m3u8_formats(hls_url, video_id, 'mp4') |  | ||||||
|         else: |  | ||||||
|             formats = self._extract_akamai_formats( |  | ||||||
|                 hls_url, video_id, {'http': 'videoplatform.sky.it'}) |  | ||||||
|         self._sort_formats(formats) |         self._sort_formats(formats) | ||||||
| 
 | 
 | ||||||
|         return { |         return { | ||||||
| @@ -80,14 +75,17 @@ class SkyItVideoIE(SkyItPlayerIE): | |||||||
|     _VALID_URL = r'https?://(?:masterchef|video|xfactor)\.sky\.it(?:/[^/]+)*/video/[0-9a-z-]+-(?P<id>\d+)' |     _VALID_URL = r'https?://(?:masterchef|video|xfactor)\.sky\.it(?:/[^/]+)*/video/[0-9a-z-]+-(?P<id>\d+)' | ||||||
|     _TESTS = [{ |     _TESTS = [{ | ||||||
|         'url': 'https://video.sky.it/news/mondo/video/uomo-ucciso-da-uno-squalo-in-australia-631227', |         'url': 'https://video.sky.it/news/mondo/video/uomo-ucciso-da-uno-squalo-in-australia-631227', | ||||||
|         'md5': 'fe5c91e59a84a3437eaa0bca6e134ccd', |         'md5': '5b858a62d9ffe2ab77b397553024184a', | ||||||
|         'info_dict': { |         'info_dict': { | ||||||
|             'id': '631227', |             'id': '631227', | ||||||
|             'ext': 'mp4', |             'ext': 'mp4', | ||||||
|             'title': 'Uomo ucciso da uno squalo in Australia', |             'title': 'Uomo ucciso da uno squalo in Australia', | ||||||
|             'timestamp': 1606036192, |             'timestamp': 1606036192, | ||||||
|             'upload_date': '20201122', |             'upload_date': '20201122', | ||||||
|         } |             'duration': 26, | ||||||
|  |             'thumbnail': 'https://video.sky.it/captures/thumbs/631227/631227_thumb_880x494.jpg', | ||||||
|  |         }, | ||||||
|  |         'params': {'skip_download': 'm3u8'}, | ||||||
|     }, { |     }, { | ||||||
|         'url': 'https://xfactor.sky.it/video/x-factor-2020-replay-audizioni-1-615820', |         'url': 'https://xfactor.sky.it/video/x-factor-2020-replay-audizioni-1-615820', | ||||||
|         'only_matching': True, |         'only_matching': True, | ||||||
| @@ -110,7 +108,8 @@ class SkyItVideoLiveIE(SkyItPlayerIE): | |||||||
|             'id': '1', |             'id': '1', | ||||||
|             'ext': 'mp4', |             'ext': 'mp4', | ||||||
|             'title': r're:Diretta TG24 \d{4}-\d{2}-\d{2} \d{2}:\d{2}', |             'title': r're:Diretta TG24 \d{4}-\d{2}-\d{2} \d{2}:\d{2}', | ||||||
|             'description': 'Guarda la diretta streaming di SkyTg24, segui con Sky tutti gli appuntamenti e gli speciali di Tg24.', |             'description': r're:(?:Clicca play e )?[Gg]uarda la diretta streaming di SkyTg24, segui con Sky tutti gli appuntamenti e gli speciali di Tg24\.', | ||||||
|  |             'live_status': 'is_live', | ||||||
|         }, |         }, | ||||||
|         'params': { |         'params': { | ||||||
|             # m3u8 download |             # m3u8 download | ||||||
| @@ -132,15 +131,17 @@ class SkyItIE(SkyItPlayerIE): | |||||||
|     IE_NAME = 'sky.it' |     IE_NAME = 'sky.it' | ||||||
|     _VALID_URL = r'https?://(?:sport|tg24)\.sky\.it(?:/[^/]+)*/\d{4}/\d{2}/\d{2}/(?P<id>[^/?&#]+)' |     _VALID_URL = r'https?://(?:sport|tg24)\.sky\.it(?:/[^/]+)*/\d{4}/\d{2}/\d{2}/(?P<id>[^/?&#]+)' | ||||||
|     _TESTS = [{ |     _TESTS = [{ | ||||||
|         'url': 'https://sport.sky.it/calcio/serie-a/2020/11/21/juventus-cagliari-risultato-gol', |         'url': 'https://sport.sky.it/calcio/serie-a/2022/11/03/brozovic-inter-news', | ||||||
|         'info_dict': { |         'info_dict': { | ||||||
|             'id': '631201', |             'id': '789222', | ||||||
|             'ext': 'mp4', |             'ext': 'mp4', | ||||||
|             'title': 'Un rosso alla violenza: in campo per i diritti delle donne', |             'title': 'Brozovic con il gruppo: verso convocazione per Juve-Inter', | ||||||
|             'upload_date': '20201121', |             'upload_date': '20221103', | ||||||
|             'timestamp': 1605995753, |             'timestamp': 1667484130, | ||||||
|  |             'duration': 22, | ||||||
|  |             'thumbnail': 'https://videoplatform.sky.it/still/2022/11/03/1667480526353_brozovic_videostill_1.jpg', | ||||||
|         }, |         }, | ||||||
|         'expected_warnings': ['Unable to download f4m manifest'], |         'params': {'skip_download': 'm3u8'}, | ||||||
|     }, { |     }, { | ||||||
|         'url': 'https://tg24.sky.it/mondo/2020/11/22/australia-squalo-uccide-uomo', |         'url': 'https://tg24.sky.it/mondo/2020/11/22/australia-squalo-uccide-uomo', | ||||||
|         'md5': 'fe5c91e59a84a3437eaa0bca6e134ccd', |         'md5': 'fe5c91e59a84a3437eaa0bca6e134ccd', | ||||||
| @@ -150,7 +151,10 @@ class SkyItIE(SkyItPlayerIE): | |||||||
|             'title': 'Uomo ucciso da uno squalo in Australia', |             'title': 'Uomo ucciso da uno squalo in Australia', | ||||||
|             'timestamp': 1606036192, |             'timestamp': 1606036192, | ||||||
|             'upload_date': '20201122', |             'upload_date': '20201122', | ||||||
|  |             'duration': 26, | ||||||
|  |             'thumbnail': 'https://video.sky.it/captures/thumbs/631227/631227_thumb_880x494.jpg', | ||||||
|         }, |         }, | ||||||
|  |         'params': {'skip_download': 'm3u8'}, | ||||||
|     }] |     }] | ||||||
|     _VIDEO_ID_REGEX = r'data-videoid="(\d+)"' |     _VIDEO_ID_REGEX = r'data-videoid="(\d+)"' | ||||||
| 
 | 
 | ||||||
| @@ -162,40 +166,25 @@ class SkyItIE(SkyItPlayerIE): | |||||||
|         return self._player_url_result(video_id) |         return self._player_url_result(video_id) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class SkyItAcademyIE(SkyItIE): |  | ||||||
|     IE_NAME = 'skyacademy.it' |  | ||||||
|     _VALID_URL = r'https?://(?:www\.)?skyacademy\.it(?:/[^/]+)*/\d{4}/\d{2}/\d{2}/(?P<id>[^/?&#]+)' |  | ||||||
|     _TESTS = [{ |  | ||||||
|         'url': 'https://www.skyacademy.it/eventi-speciali/2019/07/05/a-lezione-di-cinema-con-sky-academy-/', |  | ||||||
|         'md5': 'ced5c26638b7863190cbc44dd6f6ba08', |  | ||||||
|         'info_dict': { |  | ||||||
|             'id': '523458', |  | ||||||
|             'ext': 'mp4', |  | ||||||
|             'title': 'Sky Academy "The Best CineCamp 2019"', |  | ||||||
|             'timestamp': 1562843784, |  | ||||||
|             'upload_date': '20190711', |  | ||||||
|         } |  | ||||||
|     }] |  | ||||||
|     _DOMAIN = 'skyacademy' |  | ||||||
|     _VIDEO_ID_REGEX = r'id="news-videoId_(\d+)"' |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| class SkyItArteIE(SkyItIE): | class SkyItArteIE(SkyItIE): | ||||||
|     IE_NAME = 'arte.sky.it' |     IE_NAME = 'arte.sky.it' | ||||||
|     _VALID_URL = r'https?://arte\.sky\.it/video/(?P<id>[^/?&#]+)' |     _VALID_URL = r'https?://arte\.sky\.it/video/(?P<id>[^/?&#]+)' | ||||||
|     _TESTS = [{ |     _TESTS = [{ | ||||||
|         'url': 'https://arte.sky.it/video/serie-musei-venezia-collezionismo-12-novembre/', |         'url': 'https://arte.sky.it/video/oliviero-toscani-torino-galleria-mazzoleni-788962', | ||||||
|         'md5': '515aee97b87d7a018b6c80727d3e7e17', |         'md5': '515aee97b87d7a018b6c80727d3e7e17', | ||||||
|         'info_dict': { |         'info_dict': { | ||||||
|             'id': '627926', |             'id': '788962', | ||||||
|             'ext': 'mp4', |             'ext': 'mp4', | ||||||
|             'title': "Musei Galleria Franchetti alla Ca' d'Oro Palazzo Grimani", |             'title': 'La fotografia di Oliviero Toscani conquista Torino', | ||||||
|             'upload_date': '20201106', |             'upload_date': '20221102', | ||||||
|             'timestamp': 1604664493, |             'timestamp': 1667399996, | ||||||
|         } |             'duration': 12, | ||||||
|  |             'thumbnail': 'https://videoplatform.sky.it/still/2022/11/02/1667396388552_oliviero-toscani-torino-galleria-mazzoleni_videostill_1.jpg', | ||||||
|  |         }, | ||||||
|  |         'params': {'skip_download': 'm3u8'}, | ||||||
|     }] |     }] | ||||||
|     _DOMAIN = 'skyarte' |     _DOMAIN = 'skyarte' | ||||||
|     _VIDEO_ID_REGEX = r'(?s)<iframe[^>]+src="(?:https:)?//player\.sky\.it/player/external\.html\?[^"]*\bid=(\d+)' |     _VIDEO_ID_REGEX = r'"embedUrl"\s*:\s*"(?:https:)?//player\.sky\.it/player/external\.html\?[^"]*\bid=(\d+)' | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class CieloTVItIE(SkyItIE): | class CieloTVItIE(SkyItIE): | ||||||
| @@ -210,7 +199,10 @@ class CieloTVItIE(SkyItIE): | |||||||
|             'title': 'Il lunedì è sempre un dramma', |             'title': 'Il lunedì è sempre un dramma', | ||||||
|             'upload_date': '20190329', |             'upload_date': '20190329', | ||||||
|             'timestamp': 1553862178, |             'timestamp': 1553862178, | ||||||
|         } |             'duration': 30, | ||||||
|  |             'thumbnail': 'https://videoplatform.sky.it/still/2019/03/29/1553858575610_lunedi_dramma_mant_videostill_1.jpg', | ||||||
|  |         }, | ||||||
|  |         'params': {'skip_download': 'm3u8'}, | ||||||
|     }] |     }] | ||||||
|     _DOMAIN = 'cielo' |     _DOMAIN = 'cielo' | ||||||
|     _VIDEO_ID_REGEX = r'videoId\s*=\s*"(\d+)"' |     _VIDEO_ID_REGEX = r'videoId\s*=\s*"(\d+)"' | ||||||
| @@ -218,9 +210,9 @@ class CieloTVItIE(SkyItIE): | |||||||
| 
 | 
 | ||||||
| class TV8ItIE(SkyItVideoIE): | class TV8ItIE(SkyItVideoIE): | ||||||
|     IE_NAME = 'tv8.it' |     IE_NAME = 'tv8.it' | ||||||
|     _VALID_URL = r'https?://tv8\.it/showvideo/(?P<id>\d+)' |     _VALID_URL = r'https?://(?:www\.)?tv8\.it/(?:show)?video/[0-9a-z-]+-(?P<id>\d+)' | ||||||
|     _TESTS = [{ |     _TESTS = [{ | ||||||
|         'url': 'https://tv8.it/showvideo/630529/ogni-mattina-ucciso-asino-di-andrea-lo-cicero/18-11-2020/', |         'url': 'https://www.tv8.it/video/ogni-mattina-ucciso-asino-di-andrea-lo-cicero-630529', | ||||||
|         'md5': '9ab906a3f75ea342ed928442f9dabd21', |         'md5': '9ab906a3f75ea342ed928442f9dabd21', | ||||||
|         'info_dict': { |         'info_dict': { | ||||||
|             'id': '630529', |             'id': '630529', | ||||||
| @@ -228,6 +220,9 @@ class TV8ItIE(SkyItVideoIE): | |||||||
|             'title': 'Ogni mattina - Ucciso asino di Andrea Lo Cicero', |             'title': 'Ogni mattina - Ucciso asino di Andrea Lo Cicero', | ||||||
|             'timestamp': 1605721374, |             'timestamp': 1605721374, | ||||||
|             'upload_date': '20201118', |             'upload_date': '20201118', | ||||||
|         } |             'duration': 114, | ||||||
|  |             'thumbnail': 'https://videoplatform.sky.it/still/2020/11/18/1605717753954_ogni-mattina-ucciso-asino-di-andrea-lo-cicero_videostill_1.jpg', | ||||||
|  |         }, | ||||||
|  |         'params': {'skip_download': 'm3u8'}, | ||||||
|     }] |     }] | ||||||
|     _DOMAIN = 'mtv8' |     _DOMAIN = 'mtv8' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nixxo
					nixxo