def get_video_url(plugin, item_id, video_url, download_mode=False, video_label=None, **kwargs): resp = urlquick.get(video_url) json_value = re.compile(r'window\.__DATA__ \= (.*?)\}\;').findall( resp.text)[0] json_parser = json.loads(json_value + '}') video_uri = '' for main_contents_datas in json_parser['children']: if 'MainContainer' in main_contents_datas['type']: for stream_child in main_contents_datas['children']: if 'VideoPlayer' in stream_child['type']: video_uri = stream_child['props']['media']['video'][ 'config']['uri'] account_override = 'intl.mtvi.com' ep = '00a43210' return resolver_proxy.get_mtvnservices_stream(plugin, video_uri, download_mode, video_label, account_override, ep)
def get_live_url(plugin, item_id, **kwargs): resp = urlquick.get(URL_LIVE) video_uri = re.compile(r'\"config"\:\{\"uri\"\:\"(.*?)\"').findall( resp.text)[0] return resolver_proxy.get_mtvnservices_stream(plugin, video_uri)
def get_video_url(plugin, item_id, video_url, download_mode=False, **kwargs): resp = urlquick.get(video_url) video_id = re.compile(r'itemId":"(.*?)"').findall(resp.text)[0] video_uri = 'mgid:arc:video:mtv.fr:' + video_id return resolver_proxy.get_mtvnservices_stream(plugin, video_uri, download_mode)
def get_live_url(plugin, item_id, video_id, item_dict): if DESIRED_LANGUAGE.lower() == 'es': resp = urlquick.get(URL_LIVE_ES) video_uri = re.compile(r'\"config"\:\{\"uri\"\:\"(.*?)\"').findall( resp.text)[0] # elif DESIRED_LANGUAGE.lower() == 'us': # resp = urlquick.get(URL_LIVE_US) # video_uri = re.compile( # r'\"config"\:\{\"uri\"\:\"(.*?)\"').findall(resp.text)[0] elif DESIRED_LANGUAGE.lower() == 'it': resp = urlquick.get(URL_LIVE_IT) video_uri_1 = re.compile(r'data-mtv-uri="(.*?)"').findall(resp.text)[0] headers = { 'Content-Type': 'application/json', 'referer': 'http://www.paramountchannel.it/tv/diretta' } resp2 = urlquick.get(URL_LIVE_URI % video_uri_1, headers=headers) json_parser = json.loads(resp2.text) if 'items' not in json_parser["feed"]: plugin.notify('ERROR', plugin.localize(30713)) return False video_uri = json_parser["feed"]["items"][0]["guid"] else: return '' return resolver_proxy.get_mtvnservices_stream(plugin, video_uri)
def get_live_url(plugin, item_id, video_id, **kwargs): resp = urlquick.get(URL_LIVE, max_age=-1) video_uri = re.compile(r'uri\"\:\"(.*?)\"').findall(resp.text)[0] account_override = 'intl.mtvi.com' ep = 'be84d1a2' return resolver_proxy.get_mtvnservices_stream(plugin, video_uri, False, '', account_override, ep)
def get_video_url(plugin, item_id, video_url, download_mode=False, video_label=None): resp = urlquick.get(video_url, headers={'User-Agent': web_utils.get_random_ua}, max_age=-1) video_uri = re.compile(r'data-mtv-uri="(.*?)"').findall(resp.text)[0] return resolver_proxy.get_mtvnservices_stream(plugin, video_uri, download_mode, video_label)
def get_video_url(plugin, item_id, video_url, download_mode=False, video_label=None): resp = urlquick.get(video_url, headers={'User-Agent': web_utils.get_random_ua}, max_age=-1) video_uri = re.compile(r'uri\: \'(.*?)\'').findall(resp.text)[0] account_override = 'intl.mtvi.com' return resolver_proxy.get_mtvnservices_stream(plugin, video_uri, account_override, download_mode, video_label)
def get_live_url(plugin, item_id, video_id, item_dict, **kwargs): resp = urlquick.get(URL_LIVE) video_uri_1 = re.compile(r'data-mtv-uri="(.*?)"').findall(resp.text)[0] headers = { 'Content-Type': 'application/json', 'referer': 'http://www.paramountchannel.it/tv/diretta' } resp2 = urlquick.get(URL_LIVE_URI % video_uri_1, headers=headers) json_parser = json.loads(resp2.text) if 'items' not in json_parser["feed"]: plugin.notify('ERROR', plugin.localize(30713)) return False video_uri = json_parser["feed"]["items"][0]["guid"] return resolver_proxy.get_mtvnservices_stream(plugin, video_uri)
def get_live_url(plugin, item_id, video_id, item_dict): final_language = DESIRED_LANGUAGE # If we come from the M3U file and the language # is set in the M3U URL, then we overwrite # Catch Up TV & More language setting if type(item_dict) is not dict: item_dict = eval(item_dict) if 'language' in item_dict: final_language = item_dict['language'] if final_language.lower() == 'es': resp = urlquick.get(URL_LIVE_ES) video_uri = re.compile(r'\"config"\:\{\"uri\"\:\"(.*?)\"').findall( resp.text)[0] # elif DESIRED_LANGUAGE.lower() == 'us': # resp = urlquick.get(URL_LIVE_US) # video_uri = re.compile( # r'\"config"\:\{\"uri\"\:\"(.*?)\"').findall(resp.text)[0] elif final_language.lower() == 'it': resp = urlquick.get(URL_LIVE_IT) video_uri_1 = re.compile(r'data-mtv-uri="(.*?)"').findall(resp.text)[0] headers = { 'Content-Type': 'application/json', 'referer': 'http://www.paramountchannel.it/tv/diretta' } resp2 = urlquick.get(URL_LIVE_URI % video_uri_1, headers=headers) json_parser = json.loads(resp2.text) if 'items' not in json_parser["feed"]: plugin.notify('ERROR', plugin.localize(30713)) return False video_uri = json_parser["feed"]["items"][0]["guid"] else: return '' return resolver_proxy.get_mtvnservices_stream(plugin, video_uri)