Skip to content

Commit 0f1b817

Browse files
authored
srgssr.py: use HTTPS to retrieve subtitles and token (#26)
1 parent 3b7fddc commit 0f1b817

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/srgssr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def get_auth_url(self, url, segment_data=None):
10741074
spl = urlps(url).path.split('/')
10751075
token = json.loads(
10761076
self.open_url(
1077-
f'http://tp.srgssr.ch/akahd/token?acl=/{spl[1]}/{spl[2]}/*',
1077+
f'https://tp.srgssr.ch/akahd/token?acl=/{spl[1]}/{spl[2]}/*',
10781078
use_cache=False)) or {}
10791079
auth_params = token.get('token', {}).get('authparams')
10801080
if auth_params:
@@ -1272,7 +1272,7 @@ def get_subtitles(self, url, name):
12721272

12731273
cap_comps = caption.split(':')
12741274
lang = '.' + cap_comps[1] if len(cap_comps) > 1 else ''
1275-
sub_url = ('http://' + webvttbaseurl + '/' + cap_comps[0])
1275+
sub_url = ('https://' + webvttbaseurl + '/' + cap_comps[0])
12761276
self.log('subtitle url: ' + sub_url)
12771277
if not sub_url.endswith('.m3u8'):
12781278
return [sub_url]

0 commit comments

Comments
 (0)