Skip to content

Commit

Permalink
[extractor/embedly] Embedded links may be for other extractors
Browse files Browse the repository at this point in the history
Bug in bfd973e
Closes #5987
  • Loading branch information
pukkandan committed Jan 7, 2023
1 parent 355d781 commit 87ebab0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yt_dlp/extractor/embedly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<url>[^"\']+)', webpage):
yield mobj.group('url')
yield cls.url_result(mobj.group('url'))

for mobj in re.finditer(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P<url>[^&]+)', 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)
Expand Down

0 comments on commit 87ebab0

Please sign in to comment.