]> jfr.im git - yt-dlp.git/commitdiff
[extractor/freesound] Workaround invalid URL in webpage (#6147)
authorJasper Rebane <redacted>
Fri, 3 Feb 2023 14:38:51 +0000 (16:38 +0200)
committerGitHub <redacted>
Fri, 3 Feb 2023 14:38:51 +0000 (20:08 +0530)
Authored by: rebane2001
Closes #6146

yt_dlp/extractor/freesound.py

index 8b5f2278cd8da9a27aa34ba4836d3852fb18062a..fcde04469c50d6803dd16d445b9fe605c6335cf0 100644 (file)
@@ -52,6 +52,7 @@ def _real_extract(self, url):
         tags_str = get_element_by_class('tags', webpage)
         tags = re.findall(r'<a[^>]+>([^<]+)', 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'