]> jfr.im git - yt-dlp.git/commitdiff
[utils] clean_podcast_url: Handle protocol in redirect URL
authorpukkandan <redacted>
Mon, 26 Jun 2023 10:49:49 +0000 (16:19 +0530)
committerpukkandan <redacted>
Mon, 26 Jun 2023 10:49:49 +0000 (16:19 +0530)
Closes #7430

yt_dlp/utils/_utils.py

index de51f62083179d5d854d117954867fc08b57667f..f68cdb96868b45ae0b393a806094dd69778856a7 100644 (file)
@@ -5113,7 +5113,7 @@ def format_field(obj, field=None, template='%s', ignore=NO_DEFAULT, default='',
 
 
 def clean_podcast_url(url):
-    return re.sub(r'''(?x)
+    url = re.sub(r'''(?x)
         (?:
             (?:
                 chtbl\.com/track|
@@ -5127,6 +5127,7 @@ def clean_podcast_url(url):
                 st\.fm # https://podsights.com/docs/
             )/e
         )/''', '', url)
+    return re.sub(r'^\w+://(\w+://)', r'\1', url)
 
 
 _HEX_TABLE = '0123456789abcdef'