mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 08:57:27 +08:00
Work around broken fragment URLs for svtplay as described in issue 10909
This commit is contained in:
parent
2c6da7df4a
commit
3cfc553a03
@ -37,6 +37,14 @@ class SVTBaseIE(InfoExtractor):
|
||||
'format_id': player_type,
|
||||
'url': vurl,
|
||||
})
|
||||
|
||||
# Work around issue 10909 by manually rewriting fragment URLs to URLs that appear to work
|
||||
for format in formats:
|
||||
if 'fragments' in format:
|
||||
for segment in format['fragments']:
|
||||
segment_url = re.sub('dash-live/[^.].*/./', 'dash-live/./', segment['url'])
|
||||
segment.update({'url': segment_url})
|
||||
|
||||
if not formats and video_info.get('rights', {}).get('geoBlockedSweden'):
|
||||
self.raise_geo_restricted('This video is only available in Sweden')
|
||||
self._sort_formats(formats)
|
||||
|
Loading…
x
Reference in New Issue
Block a user