Skip to content

Commit

Permalink
[IT - RAIPLAY] Fix RaiPlay live TV
Browse files Browse the repository at this point in the history
  • Loading branch information
jmzambon authored and joaopa00 committed May 25, 2024
1 parent e71601c commit fc60346
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions resources/lib/channels/it/raiplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import urlquick
from codequick import Listitem, Resolver, Route, Script
from resources.lib import download
from resources.lib import download, web_utils
from resources.lib.menu_utils import item_post_treatment

# TO DO
Expand All @@ -27,6 +27,8 @@

URL_HOMEPAGE = URL_ROOT + '/index.json'

GENERIC_HEADERS = {'User-Agent': web_utils.get_random_ua()}


# ROOT_______________
@Route.register
Expand Down Expand Up @@ -323,5 +325,9 @@ def get_video_url(plugin, item_id, video_url, download_mode=False, **kwargs):

@Resolver.register
def get_live_url(plugin, item_id, **kwargs):
resp = urlquick.get(URL_LIVE % item_id, max_age=-1).json()
return resp['video']['content_url']
resp = urlquick.get(URL_LIVE % item_id, headers=GENERIC_HEADERS, max_age=-1).json()
# import web_pdb; web_pdb.set_trace()
url = resp['video']['content_url'] + "&output=64"

Check failure on line 330 in resources/lib/channels/it/raiplay.py

View workflow job for this annotation

GitHub Actions / Flake8

resources/lib/channels/it/raiplay.py#L330

Local variable 'url' is assigned to but never used (F841)
resp = urlquick.get(url1, headers=GENERIC_HEADERS, max_age=-1).text

Check failure on line 331 in resources/lib/channels/it/raiplay.py

View workflow job for this annotation

GitHub Actions / Flake8

resources/lib/channels/it/raiplay.py#L331

Undefined name 'url1' (F821)

return re.findall(r"<!\[CDATA\[(.*?)\]\]>", resp)[0]

0 comments on commit fc60346

Please sign in to comment.