Skip to content

Commit

Permalink
srgssr.py: use HTTPS to retrieve subtitles and token (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats authored Apr 4, 2024
1 parent 3b7fddc commit 0f1b817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/srgssr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def get_auth_url(self, url, segment_data=None):
spl = urlps(url).path.split('/')
token = json.loads(
self.open_url(
f'http://tp.srgssr.ch/akahd/token?acl=/{spl[1]}/{spl[2]}/*',
f'https://tp.srgssr.ch/akahd/token?acl=/{spl[1]}/{spl[2]}/*',
use_cache=False)) or {}
auth_params = token.get('token', {}).get('authparams')
if auth_params:
Expand Down Expand Up @@ -1272,7 +1272,7 @@ def get_subtitles(self, url, name):

cap_comps = caption.split(':')
lang = '.' + cap_comps[1] if len(cap_comps) > 1 else ''
sub_url = ('http://' + webvttbaseurl + '/' + cap_comps[0])
sub_url = ('https://' + webvttbaseurl + '/' + cap_comps[0])
self.log('subtitle url: ' + sub_url)
if not sub_url.endswith('.m3u8'):
return [sub_url]
Expand Down

0 comments on commit 0f1b817

Please sign in to comment.