From 87ebab0615b1bf9b14b478b055e7059d630b4833 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sun, 8 Jan 2023 00:38:38 +0530 Subject: [PATCH] [extractor/embedly] Embedded links may be for other extractors Bug in bfd973ece3369c593b5e82a88cc16de80088a73e Closes #5987 --- yt_dlp/extractor/embedly.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/embedly.py b/yt_dlp/extractor/embedly.py index db5ef055e..1b58fca60 100644 --- a/yt_dlp/extractor/embedly.py +++ b/yt_dlp/extractor/embedly.py @@ -62,13 +62,13 @@ class EmbedlyIE(InfoExtractor): }] @classmethod - def _extract_embed_urls(cls, url, webpage): - # Bypass suitable check + def _extract_from_webpage(cls, url, webpage): + # Bypass "ie=cls" and suitable check for mobj in re.finditer(r'class=["\']embedly-card["\'][^>]href=["\'](?P[^"\']+)', webpage): - yield mobj.group('url') + yield cls.url_result(mobj.group('url')) for mobj in re.finditer(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P[^&]+)', webpage): - yield urllib.parse.unquote(mobj.group('url')) + yield cls.url_result(urllib.parse.unquote(mobj.group('url'))) def _real_extract(self, url): qs = parse_qs(url)