From fdf80059d9a6b345c90af7de1ae4c57823e20f19 Mon Sep 17 00:00:00 2001 From: Zenon Mousmoulas Date: Sun, 16 Jan 2022 14:38:31 +0200 Subject: [PATCH] [glomex] Minor fixes (#2357) Authored by: zmousm --- yt_dlp/extractor/generic.py | 1 + yt_dlp/extractor/glomex.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index 529edb598..7198aa02c 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -1874,6 +1874,7 @@ class GenericIE(InfoExtractor): 'add_ie': [RutubeIE.ie_key()], }, { + # glomex:embed 'url': 'https://www.skai.gr/news/world/iatrikos-syllogos-tourkias-to-turkovac-aplo-dialyma-erntogan-eiste-apateones-kai-pseytes', 'info_dict': { 'id': 'v-ch2nkhcirwc9-sf', diff --git a/yt_dlp/extractor/glomex.py b/yt_dlp/extractor/glomex.py index 247a65a79..ec3c35c6f 100644 --- a/yt_dlp/extractor/glomex.py +++ b/yt_dlp/extractor/glomex.py @@ -75,7 +75,7 @@ def _extract_api_data(self, video, video_id): format_url, video_id, 'mp4', m3u8_id=format_id, fatal=False) formats.extend(formats_) - subs.update(subs_) + self._merge_subtitles(subs_, target=subs) else: formats.append({ 'url': format_url, @@ -205,8 +205,6 @@ def _extract_urls(cls, webpage, origin_url): mdict = mobj.groupdict() if mdict.get('url'): url = unescapeHTML(mdict['url']) - if url.startswith('//'): - url = f'https:{url}' if not cls.suitable(url): continue yield cls._smuggle_origin_url(url, origin_url)