From a916af123c4d230d6da40cccf3dbeffa45b9d4a7 Mon Sep 17 00:00:00 2001 From: nixxo Date: Mon, 26 Oct 2020 22:01:25 +0100 Subject: [PATCH 1/7] [gedi] Add new extractor --- youtube_dlc/extractor/extractors.py | 1 + youtube_dlc/extractor/gedi.py | 213 ++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 youtube_dlc/extractor/gedi.py diff --git a/youtube_dlc/extractor/extractors.py b/youtube_dlc/extractor/extractors.py index d31edd7c8..7474902ef 100644 --- a/youtube_dlc/extractor/extractors.py +++ b/youtube_dlc/extractor/extractors.py @@ -414,6 +414,7 @@ from .gamestar import GameStarIE from .gaskrank import GaskrankIE from .gazeta import GazetaIE from .gdcvault import GDCVaultIE +from .gedi import GediDigitalIE from .generic import GenericIE from .gfycat import GfycatIE from .giantbomb import GiantBombIE diff --git a/youtube_dlc/extractor/gedi.py b/youtube_dlc/extractor/gedi.py new file mode 100644 index 000000000..5a5dabd7a --- /dev/null +++ b/youtube_dlc/extractor/gedi.py @@ -0,0 +1,213 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import re + +from .common import InfoExtractor +from ..compat import compat_str + + +class GediBaseIE(InfoExtractor): + @staticmethod + def _clean_audio_fmts(formats): + unique_formats = [] + for f in formats: + if 'acodec' in f: + unique_formats.append(f) + formats[:] = unique_formats + + def _real_extract(self, url): + u = re.match(self._VALID_URL, url) + self.IE_NAME = u.group('iename') if u.group('iename') else 'gedi' + video_id = self._match_id(url) + + webpage = self._download_webpage(url, video_id) + player_data = re.findall( + r'PlayerFactory\.setParam\(\'(?P.+?)\',\s*\'(?P.+?)\',\s*\'(?P.+?)\'\);', + webpage) + + formats = [] + audio_fmts = [] + hls_fmts = [] + http_fmts = [] + title = '' + thumb = '' + + fmt_reg = r'(?Pvideo|audio)-(?P

rrtv|hls)-(?P[\w\d]+)(?:-(?P
[\w\d]+))?$' + br_reg = r'video-rrtv-(?P
\d+)-' + + for t, n, v in player_data: + if t == 'format': + m = re.match(fmt_reg, n) + if m: + # audio formats + if m.group('t') == 'audio': + if m.group('p') == 'hls': + audio_fmts.extend(self._extract_m3u8_formats( + v, video_id, 'm4a', m3u8_id='hls', fatal=False)) + elif m.group('p') == 'rrtv': + audio_fmts.append({ + 'format_id': 'mp3', + 'url': v, + 'tbr': 128, + 'ext': 'mp3', + 'vcodec': 'none', + 'acodec': 'mp3', + }) + + # video formats + elif m.group('t') == 'video': + # hls manifest video + if m.group('p') == 'hls': + hls_fmts.extend(self._extract_m3u8_formats( + v, video_id, 'mp4', m3u8_id='hls', fatal=False)) + # direct mp4 video + elif m.group('p') == 'rrtv': + if not m.group('br'): + mm = re.search(br_reg, v) + http_fmts.append({ + 'format_id': 'https-' + m.group('h'), + 'protocol': 'https', + 'url': v, + 'tbr': int(m.group('br')) if m.group('br') else + (int(mm.group('br')) if mm.group('br') else 0), + 'height': int(m.group('h')) + }) + + elif t == 'param': + if n == 'videotitle': + title = v + if n == 'image_full_play': + thumb = v + + title = self._og_search_title(webpage) if title == '' else title + + # clean weird char + title = compat_str(title).encode('utf8', 'replace').replace(b'\xc3\x82', b'').decode('utf8', 'replace') + + if audio_fmts: + self._clean_audio_fmts(audio_fmts) + self._sort_formats(audio_fmts) + if hls_fmts: + self._sort_formats(hls_fmts) + if http_fmts: + self._sort_formats(http_fmts) + + formats.extend(audio_fmts) + formats.extend(hls_fmts) + formats.extend(http_fmts) + + return { + 'id': video_id, + 'title': title, + 'description': self._html_search_meta('twitter:description', webpage), + 'thumbnail': thumb, + 'formats': formats, + } + + +class GediIE(GediBaseIE): + IE_NAME = '' + _VALID_URL = r'''(?x)https?://video\. + (?P + (?:espresso\.)?repubblica + |lastampa + |ilsecoloxix + |iltirreno + |messaggeroveneto + |ilpiccolo + |gazzettadimantova + |mattinopadova + |laprovinciapavese + |tribunatreviso + |nuovavenezia + |gazzettadimodena + |lanuovaferrara + |corrierealpi + |lasentinella + ) + (?:\.gelocal)?\.it/.+?/(?P[\d/]+)(?:\?|\&|$)''' + _TESTS = [{ + 'url': 'https://video.lastampa.it/politica/il-paradosso-delle-regionali-la-lega-vince-ma-sembra-aver-perso/121559/121683', + 'md5': '84658d7fb9e55a6e57ecc77b73137494', + 'info_dict': { + 'id': '121559/121683', + 'ext': 'mp4', + 'title': 'Il paradosso delle Regionali: ecco perché la Lega vince ma sembra aver perso', + 'description': 'md5:de7f4d6eaaaf36c153b599b10f8ce7ca', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, + }, { + 'url': 'https://video.repubblica.it/motori/record-della-pista-a-spa-francorchamps-la-pagani-huayra-roadster-bc-stupisce/367415/367963', + 'md5': 'e763b94b7920799a0e0e23ffefa2d157', + 'info_dict': { + 'id': '367415/367963', + 'ext': 'mp4', + 'title': 'Record della pista a Spa Francorchamps, la Pagani Huayra Roadster BC stupisce', + 'description': 'md5:5deb503cefe734a3eb3f07ed74303920', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, + }, { + 'url': 'https://video.ilsecoloxix.it/sport/cassani-e-i-brividi-azzurri-ai-mondiali-di-imola-qui-mi-sono-innamorato-del-ciclismo-da-ragazzino-incredibile-tornarci-da-ct/66184/66267', + 'md5': 'e48108e97b1af137d22a8469f2019057', + 'info_dict': { + 'id': '66184/66267', + 'ext': 'mp4', + 'title': 'Cassani e i brividi azzurri ai Mondiali di Imola: \\"Qui mi sono innamorato del ciclismo da ragazzino, incredibile tornarci da ct\\"', + 'description': 'md5:fc9c50894f70a2469bb9b54d3d0a3d3b', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, + }, { + 'url': 'https://video.iltirreno.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/141059/142723', + 'md5': 'a6e39f3bdc1842bbd92abbbbef230817', + 'info_dict': { + 'id': '141059/142723', + 'ext': 'mp4', + 'title': 'Dentro la notizia - Ferrari, cosa succede a Maranello', + 'description': 'md5:9907d65b53765681fa3a0b3122617c1f', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, + }, { + 'url': 'https://video.espresso.repubblica.it/embed/tutti-i-video/01-ted-villa/14772/14870&width=640&height=360', + 'md5': '0391c2c83c6506581003aaf0255889c0', + 'info_dict': { + 'id': '14772/14870', + 'ext': 'mp4', + 'title': 'Festival EMERGENCY, Villa: «La buona informazione aiuta la salute» (14772-14870)', + 'description': 'md5:2bce954d278248f3c950be355b7c2226', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, + }, { + 'url': 'https://video.messaggeroveneto.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.ilpiccolo.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.gazzettadimantova.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.mattinopadova.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.laprovinciapavese.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.tribunatreviso.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.nuovavenezia.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.gazzettadimodena.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.lanuovaferrara.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.corrierealpi.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }, { + 'url': 'https://video.lasentinella.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', + 'only_matching': True, + }] From d4ca28745909408218992233e1d2b83bf9479ea1 Mon Sep 17 00:00:00 2001 From: nixxo Date: Mon, 26 Oct 2020 22:03:03 +0100 Subject: [PATCH 2/7] [gedi] fixed class name --- youtube_dlc/extractor/extractors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dlc/extractor/extractors.py b/youtube_dlc/extractor/extractors.py index 7474902ef..bee90d74a 100644 --- a/youtube_dlc/extractor/extractors.py +++ b/youtube_dlc/extractor/extractors.py @@ -414,7 +414,7 @@ from .gamestar import GameStarIE from .gaskrank import GaskrankIE from .gazeta import GazetaIE from .gdcvault import GDCVaultIE -from .gedi import GediDigitalIE +from .gedi import GediIE from .generic import GenericIE from .gfycat import GfycatIE from .giantbomb import GiantBombIE From 165ce9f7738820fc0b662774d120149229c31ec1 Mon Sep 17 00:00:00 2001 From: nixxo Date: Wed, 28 Oct 2020 20:04:00 +0100 Subject: [PATCH 3/7] [gedi] removed unused tests, fixed extractor name --- youtube_dlc/extractor/gedi.py | 38 +---------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/youtube_dlc/extractor/gedi.py b/youtube_dlc/extractor/gedi.py index 5a5dabd7a..5efc8a6e9 100644 --- a/youtube_dlc/extractor/gedi.py +++ b/youtube_dlc/extractor/gedi.py @@ -17,8 +17,6 @@ class GediBaseIE(InfoExtractor): formats[:] = unique_formats def _real_extract(self, url): - u = re.match(self._VALID_URL, url) - self.IE_NAME = u.group('iename') if u.group('iename') else 'gedi' video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) @@ -107,9 +105,8 @@ class GediBaseIE(InfoExtractor): class GediIE(GediBaseIE): - IE_NAME = '' _VALID_URL = r'''(?x)https?://video\. - (?P + (?: (?:espresso\.)?repubblica |lastampa |ilsecoloxix @@ -177,37 +174,4 @@ class GediIE(GediBaseIE): 'description': 'md5:2bce954d278248f3c950be355b7c2226', 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', }, - }, { - 'url': 'https://video.messaggeroveneto.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.ilpiccolo.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.gazzettadimantova.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.mattinopadova.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.laprovinciapavese.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.tribunatreviso.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.nuovavenezia.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.gazzettadimodena.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.lanuovaferrara.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.corrierealpi.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, - }, { - 'url': 'https://video.lasentinella.gelocal.it/sport/dentro-la-notizia-ferrari-cosa-succede-a-maranello/133362/134466', - 'only_matching': True, }] From 902784a2a9830f999a7d275b374952fc44bbbc02 Mon Sep 17 00:00:00 2001 From: nixxo Date: Mon, 9 Nov 2020 09:16:37 +0100 Subject: [PATCH 4/7] [gedi] added huffingtonpost, added embeds --- youtube_dlc/extractor/extractors.py | 5 +- youtube_dlc/extractor/gedi.py | 89 +++++++++++++++++++++++++++++ youtube_dlc/extractor/generic.py | 7 +++ 3 files changed, 100 insertions(+), 1 deletion(-) diff --git a/youtube_dlc/extractor/extractors.py b/youtube_dlc/extractor/extractors.py index bee90d74a..01f69c006 100644 --- a/youtube_dlc/extractor/extractors.py +++ b/youtube_dlc/extractor/extractors.py @@ -414,7 +414,10 @@ from .gamestar import GameStarIE from .gaskrank import GaskrankIE from .gazeta import GazetaIE from .gdcvault import GDCVaultIE -from .gedi import GediIE +from .gedi import ( + GediIE, + GediEmbedsIE, +) from .generic import GenericIE from .gfycat import GfycatIE from .giantbomb import GiantBombIE diff --git a/youtube_dlc/extractor/gedi.py b/youtube_dlc/extractor/gedi.py index 5efc8a6e9..f35dfca5a 100644 --- a/youtube_dlc/extractor/gedi.py +++ b/youtube_dlc/extractor/gedi.py @@ -5,6 +5,11 @@ import re from .common import InfoExtractor from ..compat import compat_str +from ..utils import ( + base_url, + url_basename, + urljoin, +) class GediBaseIE(InfoExtractor): @@ -109,6 +114,7 @@ class GediIE(GediBaseIE): (?: (?:espresso\.)?repubblica |lastampa + |huffingtonpost |ilsecoloxix |iltirreno |messaggeroveneto @@ -175,3 +181,86 @@ class GediIE(GediBaseIE): 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', }, }] + + +class GediEmbedsIE(GediBaseIE): + _VALID_URL = r'''(?x)https?://video\. + (?: + (?:espresso\.)?repubblica + |lastampa + |huffingtonpost + |ilsecoloxix + |iltirreno + |messaggeroveneto + |ilpiccolo + |gazzettadimantova + |mattinopadova + |laprovinciapavese + |tribunatreviso + |nuovavenezia + |gazzettadimodena + |lanuovaferrara + |corrierealpi + |lasentinella + ) + (?:\.gelocal)?\.it/embed/.+?/(?P[\d/]+)(?:\?|\&|$)''' + _TESTS = [{ + 'url': 'https://video.huffingtonpost.it/embed/politica/cotticelli-non-so-cosa-mi-sia-successo-sto-cercando-di-capire-se-ho-avuto-un-malore/29312/29276?responsive=true&el=video971040871621586700', + 'md5': '0391c2c83c6506581003aaf0255889c0', + 'info_dict': { + 'id': '14772/14870', + 'ext': 'mp4', + 'title': 'Festival EMERGENCY, Villa: «La buona informazione aiuta la salute» (14772-14870)', + 'description': 'md5:2bce954d278248f3c950be355b7c2226', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, + }] + + @staticmethod + def _sanitize_urls(urls): + # add protocol if missing + for i, e in enumerate(urls): + if e.startswith('//'): + urls[i] = 'https:%s' % e + # clean iframes urls + for i, e in enumerate(urls): + urls[i] = urljoin(base_url(e), url_basename(e)) + return urls + + @staticmethod + def _extract_urls(webpage): + entries = [ + mobj.group('url') + for mobj in re.finditer(r'''(?x) + (?: + data-frame-src=| + https?://video\. + (?: + (?:espresso\.)?repubblica + |lastampa + |huffingtonpost + |ilsecoloxix + |iltirreno + |messaggeroveneto + |ilpiccolo + |gazzettadimantova + |mattinopadova + |laprovinciapavese + |tribunatreviso + |nuovavenezia + |gazzettadimodena + |lanuovaferrara + |corrierealpi + |lasentinella + ) + (?:\.gelocal)?\.it/embed/.+?) + \1''', webpage)] + return GediEmbedsIE._sanitize_urls(entries) + + @staticmethod + def _extract_url(webpage): + urls = GediEmbedsIE._extract_urls(webpage) + return urls[0] if urls else None diff --git a/youtube_dlc/extractor/generic.py b/youtube_dlc/extractor/generic.py index aba06b328..3fab929a8 100644 --- a/youtube_dlc/extractor/generic.py +++ b/youtube_dlc/extractor/generic.py @@ -119,6 +119,7 @@ from .expressen import ExpressenIE from .zype import ZypeIE from .odnoklassniki import OdnoklassnikiIE from .kinja import KinjaEmbedIE +from .gedi import GediEmbedsIE class GenericIE(InfoExtractor): @@ -3213,6 +3214,12 @@ class GenericIE(InfoExtractor): return self.playlist_from_matches( zype_urls, video_id, video_title, ie=ZypeIE.ie_key()) + # Look for RCS media group embeds + gedi_urls = GediEmbedsIE._extract_urls(webpage) + if gedi_urls: + return self.playlist_from_matches( + gedi_urls, video_id, video_title, ie=GediEmbedsIE.ie_key()) + # Look for HTML5 media entries = self._parse_html5_media_entries(url, webpage, video_id, m3u8_id='hls') if entries: From 6c1c3e5b85e8b0feb39bc3a09779f62216f5c273 Mon Sep 17 00:00:00 2001 From: nixxo Date: Mon, 9 Nov 2020 09:28:50 +0100 Subject: [PATCH 5/7] [gedi] fixed Embeds test --- youtube_dlc/extractor/gedi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dlc/extractor/gedi.py b/youtube_dlc/extractor/gedi.py index f35dfca5a..baf558818 100644 --- a/youtube_dlc/extractor/gedi.py +++ b/youtube_dlc/extractor/gedi.py @@ -206,12 +206,12 @@ class GediEmbedsIE(GediBaseIE): (?:\.gelocal)?\.it/embed/.+?/(?P[\d/]+)(?:\?|\&|$)''' _TESTS = [{ 'url': 'https://video.huffingtonpost.it/embed/politica/cotticelli-non-so-cosa-mi-sia-successo-sto-cercando-di-capire-se-ho-avuto-un-malore/29312/29276?responsive=true&el=video971040871621586700', - 'md5': '0391c2c83c6506581003aaf0255889c0', + 'md5': 'f4ac23cadfea7fef89bea536583fa7ed', 'info_dict': { - 'id': '14772/14870', + 'id': '29312/29276', 'ext': 'mp4', - 'title': 'Festival EMERGENCY, Villa: «La buona informazione aiuta la salute» (14772-14870)', - 'description': 'md5:2bce954d278248f3c950be355b7c2226', + 'title': 'Cotticelli: \\"Non so cosa mi sia successo. Sto cercando di capire se ho avuto un malore\\"', + 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e', 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', }, }] From 595188ec71e0dd0c2ebdb158a2ef3f931c3e871a Mon Sep 17 00:00:00 2001 From: nixxo Date: Mon, 9 Nov 2020 09:57:15 +0100 Subject: [PATCH 6/7] [gedi] fixed Embeds tests, again --- youtube_dlc/extractor/gedi.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/youtube_dlc/extractor/gedi.py b/youtube_dlc/extractor/gedi.py index baf558818..e64ecebe7 100644 --- a/youtube_dlc/extractor/gedi.py +++ b/youtube_dlc/extractor/gedi.py @@ -170,16 +170,6 @@ class GediIE(GediBaseIE): 'description': 'md5:9907d65b53765681fa3a0b3122617c1f', 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', }, - }, { - 'url': 'https://video.espresso.repubblica.it/embed/tutti-i-video/01-ted-villa/14772/14870&width=640&height=360', - 'md5': '0391c2c83c6506581003aaf0255889c0', - 'info_dict': { - 'id': '14772/14870', - 'ext': 'mp4', - 'title': 'Festival EMERGENCY, Villa: «La buona informazione aiuta la salute» (14772-14870)', - 'description': 'md5:2bce954d278248f3c950be355b7c2226', - 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', - }, }] @@ -214,6 +204,16 @@ class GediEmbedsIE(GediBaseIE): 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e', 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', }, + }, { + 'url': 'https://video.espresso.repubblica.it/embed/tutti-i-video/01-ted-villa/14772/14870&width=640&height=360', + 'md5': '0391c2c83c6506581003aaf0255889c0', + 'info_dict': { + 'id': '14772/14870', + 'ext': 'mp4', + 'title': 'Festival EMERGENCY, Villa: «La buona informazione aiuta la salute» (14772-14870)', + 'description': 'md5:2bce954d278248f3c950be355b7c2226', + 'thumbnail': r're:^https://www\.repstatic\.it/video/photo/.+?-thumb-social-play\.jpg$', + }, }] @staticmethod From 8924ddc3eec4c03c6776673d0d5e823dc5445549 Mon Sep 17 00:00:00 2001 From: nixxo Date: Mon, 9 Nov 2020 10:07:52 +0100 Subject: [PATCH 7/7] [gedi] fixed Gedi regex --- youtube_dlc/extractor/gedi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dlc/extractor/gedi.py b/youtube_dlc/extractor/gedi.py index e64ecebe7..9d9d4acc2 100644 --- a/youtube_dlc/extractor/gedi.py +++ b/youtube_dlc/extractor/gedi.py @@ -129,7 +129,7 @@ class GediIE(GediBaseIE): |corrierealpi |lasentinella ) - (?:\.gelocal)?\.it/.+?/(?P[\d/]+)(?:\?|\&|$)''' + (?:\.gelocal)?\.it/(?!embed/).+?/(?P[\d/]+)(?:\?|\&|$)''' _TESTS = [{ 'url': 'https://video.lastampa.it/politica/il-paradosso-delle-regionali-la-lega-vince-ma-sembra-aver-perso/121559/121683', 'md5': '84658d7fb9e55a6e57ecc77b73137494',