From 9cfdbcbf3f17be51f5b6bb9bb6d880b2f3d67362 Mon Sep 17 00:00:00 2001 From: Jasper Rebane Date: Fri, 3 Feb 2023 16:38:51 +0200 Subject: [PATCH] [extractor/freesound] Workaround invalid URL in webpage (#6147) Authored by: rebane2001 Closes #6146 --- yt_dlp/extractor/freesound.py | 1 + 1 file changed, 1 insertion(+) diff --git a/yt_dlp/extractor/freesound.py b/yt_dlp/extractor/freesound.py index 8b5f2278cd..fcde04469c 100644 --- a/yt_dlp/extractor/freesound.py +++ b/yt_dlp/extractor/freesound.py @@ -52,6 +52,7 @@ def _real_extract(self, url): tags_str = get_element_by_class('tags', webpage) tags = re.findall(r']+>([^<]+)', tags_str) if tags_str else None + audio_url = re.sub(r'^https?://freesound\.org(https?://)', r'\1', audio_url) audio_urls = [audio_url] LQ_FORMAT = '-lq.mp3'