1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-06-30 11:02:54 -05:00

[openload] Improve ext extraction

This commit is contained in:
Enes
2018-06-01 20:16:22 +03:00
committed by Sergey M
parent 926d97fc6b
commit 85750f8972
3 changed files with 7 additions and 3 deletions

View File

@ -1228,7 +1228,7 @@ def unified_timestamp(date_str, day_first=True):
def determine_ext(url, default_ext='unknown_video'):
if url is None:
if url is None or '.' not in url:
return default_ext
guess = url.partition('?')[0].rpartition('.')[2]
if re.match(r'^[A-Za-z0-9]+$', guess):