Skip to content

Commit

Permalink
[BE - RTLPlay] Fix live
Browse files Browse the repository at this point in the history
  • Loading branch information
darodi authored and joaopa00 committed Apr 16, 2024
1 parent 998793e commit d62e3c0
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions resources/lib/channels/be/rtlplaybe.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from __future__ import unicode_literals

import json
import random
import re
import sys
from builtins import str
Expand Down Expand Up @@ -746,15 +747,13 @@ def get_video_assets(plugin, token, item_id):
return True, json_parser['blocks'][0]['content']['items'][0]['itemContent']['video']['assets']


def random_hexa(i):
return ''.join(random.choice('0123456789abcdef') for _ in range(i))


def get_device_id():
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/117.0",
"Accept": "*/*",
"Accept-Language": "fr-BE,en-US;q=0.7,en;q=0.3",
"referrer": ("%s/" % PUBLIC_SITE)
}
json_parser = urlquick.get(DEVICE_ID_URL, headers=headers, max_age=-1).json()
return json_parser['device_id']
uuid = '-'.join([random_hexa(8), random_hexa(4), random_hexa(4), random_hexa(4), random_hexa(12)])
return '_luid_' + uuid


def get_jwt(device_id, uid, signature_timestamp, uid_signature):
Expand Down Expand Up @@ -813,15 +812,7 @@ def accounts_login(plugin, api_key):
"loginID": login,
"password": password,
"apiKey": api_key,
# "sessionExpiration": "-2",
# "targetEnv": "jssdk",
# "include": "profile,data",
# "includeUserInfo": "true",
"lang": "fr",
# "sdk": "js_latest",
# "authMode": "cookie",
# "pageURL": "https://www.rtlplay.be/",
# "sdkBuild": "15170",
"format": "json"
}

Expand Down

0 comments on commit d62e3c0

Please sign in to comment.