mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-19 11:19:28 +01:00
[nhl] Make sure we add '_sd' before the extension (fixes #4397)
'.replace' would find the first dot in the path.
This commit is contained in:
parent
0ef4d4ab7e
commit
603c92080f
@ -2,6 +2,7 @@
|
||||
|
||||
import re
|
||||
import json
|
||||
import os
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import (
|
||||
@ -26,7 +27,8 @@ def _extract_video(self, info):
|
||||
initial_video_url = info['publishPoint']
|
||||
if info['formats'] == '1':
|
||||
parsed_url = compat_urllib_parse_urlparse(initial_video_url)
|
||||
path = parsed_url.path.replace('.', '_sd.', 1)
|
||||
filename, ext = os.path.splitext(parsed_url.path)
|
||||
path = '%s_sd%s' % (filename, ext)
|
||||
data = compat_urllib_parse.urlencode({
|
||||
'type': 'fvod',
|
||||
'path': compat_urlparse.urlunparse(parsed_url[:2] + (path,) + parsed_url[3:])
|
||||
|
Loading…
Reference in New Issue
Block a user