From 88515d1f526e9da58d81dbeecdd0973c9c27e583 Mon Sep 17 00:00:00 2001 From: nixxo Date: Sat, 19 Sep 2020 13:24:09 +0200 Subject: [PATCH] [skyitalia] improved indentation --- youtube_dl/extractor/skyitalia.py | 88 ++++++++++++++----------------- 1 file changed, 40 insertions(+), 48 deletions(-) diff --git a/youtube_dl/extractor/skyitalia.py b/youtube_dl/extractor/skyitalia.py index 6f4fd3819..4d5b0bbd3 100644 --- a/youtube_dl/extractor/skyitalia.py +++ b/youtube_dl/extractor/skyitalia.py @@ -59,22 +59,19 @@ class SkyVideoItIE(SkyItaliaBaseIE): IE_NAME = 'video.sky.it' _VALID_URL = r'https?://video\.sky\.it/[0-9a-z-/]+-(?P[0-9]{6})(?:$|\?)' - _TESTS = [ - { - 'url': 'https://video.sky.it/sport/motogp/video/motogp-gp-emilia-romagna-highlights-prove-libere-616162', - 'md5': '9c03b590b06e5952d8051f0e02b0feca', - 'info_dict': { - 'id': '616162', - 'ext': 'mp4', - 'title': 'MotoGP, GP Emilia Romagna: gli highlights delle prove libere', - 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/18/1600441214452_hl-libere-motogp-misano2_5602634_thumbnail_1.jpg', - } - }, - { - 'url': 'https://video.sky.it/sport/motogp/video/motogp-gp-emilia-romagna-highlights-prove-libere-616162?itm_source=parsely-api', - 'only_matching': True, + _TESTS = [{ + 'url': 'https://video.sky.it/sport/motogp/video/motogp-gp-emilia-romagna-highlights-prove-libere-616162', + 'md5': '9c03b590b06e5952d8051f0e02b0feca', + 'info_dict': { + 'id': '616162', + 'ext': 'mp4', + 'title': 'MotoGP, GP Emilia Romagna: gli highlights delle prove libere', + 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/18/1600441214452_hl-libere-motogp-misano2_5602634_thumbnail_1.jpg', } - ] + }, { + 'url': 'https://video.sky.it/sport/motogp/video/motogp-gp-emilia-romagna-highlights-prove-libere-616162?itm_source=parsely-api', + 'only_matching': True, + }] def _real_extract(self, url): return self._get_formats(self._match_id(url)) @@ -84,18 +81,16 @@ class SkySportItIE(SkyItaliaBaseIE): IE_NAME = 'sport.sky.it' _VALID_URL = r'https?://sport\.sky\.it/.+?$' - _TESTS = [ - { - 'url': 'https://sport.sky.it/motogp/2020/09/18/motogp-gp-emilia-romagna-misano-2020-prove-libere-diretta', - 'md5': '9c03b590b06e5952d8051f0e02b0feca', - 'info_dict': { - 'id': '616162', - 'ext': 'mp4', - 'title': 'MotoGP, GP Emilia Romagna: gli highlights delle prove libere', - 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/18/1600441214452_hl-libere-motogp-misano2_5602634_thumbnail_1.jpg', - } + _TESTS = [{ + 'url': 'https://sport.sky.it/motogp/2020/09/18/motogp-gp-emilia-romagna-misano-2020-prove-libere-diretta', + 'md5': '9c03b590b06e5952d8051f0e02b0feca', + 'info_dict': { + 'id': '616162', + 'ext': 'mp4', + 'title': 'MotoGP, GP Emilia Romagna: gli highlights delle prove libere', + 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/18/1600441214452_hl-libere-motogp-misano2_5602634_thumbnail_1.jpg', } - ] + }] def _real_extract(self, url): return self._get_formats(self._extract_video_id(url)) @@ -105,18 +100,16 @@ class SkyTg24ItIE(SkyItaliaBaseIE): IE_NAME = 'tg24.sky.it' _VALID_URL = r'https?://tg24\.sky\.it/.+?$' - _TESTS = [ - { - 'url': 'https://tg24.sky.it/salute-e-benessere/2020/09/18/coronavirus-vaccino-ue-sanofi', - 'md5': 'caa25e62dadb529bc5e0b078da99f854', - 'info_dict': { - 'id': '615904', - 'ext': 'mp4', - 'title': 'Covid-19, al Buzzi di Milano tamponi drive-in per studenti', - 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/17/1600351405841_error-coronavirus-al-buzzi-di-milano-tamponi_thumbnail_1.jpg', - } + _TESTS = [{ + 'url': 'https://tg24.sky.it/salute-e-benessere/2020/09/18/coronavirus-vaccino-ue-sanofi', + 'md5': 'caa25e62dadb529bc5e0b078da99f854', + 'info_dict': { + 'id': '615904', + 'ext': 'mp4', + 'title': 'Covid-19, al Buzzi di Milano tamponi drive-in per studenti', + 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/17/1600351405841_error-coronavirus-al-buzzi-di-milano-tamponi_thumbnail_1.jpg', } - ] + }] def _real_extract(self, url): return self._get_formats(self._extract_video_id(url)) @@ -126,18 +119,17 @@ class SkyArteItIE(SkyItaliaBaseIE): IE_NAME = 'arte.sky.it' _VALID_URL = r'https?://arte\.sky\.it/video/.+?$' - _TESTS = [ - { - 'url': 'https://arte.sky.it/video/federico-fellini-maestri-cinema/', - 'md5': '2f22513a89f45142f2746f878d690647', - 'info_dict': { - 'id': '612888', - 'ext': 'mp4', - 'title': 'I maestri del cinema Federico Felini', - 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/03/1599146747305_i-maestri-del-cinema-federico-felini_thumbnail_1.jpg', - } + _TESTS = [{ + 'url': 'https://arte.sky.it/video/federico-fellini-maestri-cinema/', + 'md5': '2f22513a89f45142f2746f878d690647', + 'info_dict': { + 'id': '612888', + 'ext': 'mp4', + 'title': 'I maestri del cinema Federico Felini', + 'thumbnail': 'https://videoplatform.sky.it/thumbnail/2020/09/03/1599146747305_i-maestri-del-cinema-federico-felini_thumbnail_1.jpg', } - ] + }] + _TOKEN = 'LWk29hfiU39NNdq87ePeRach3nzTSV20o0lTv2001Cd' def _real_extract(self, url):