[openload] Improve ext extraction
This commit is contained in:
parent
926d97fc6b
commit
85750f8972
3 changed files with 7 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue