diff --git a/channels/streamingcommunity.py b/channels/streamingcommunity.py index d4ed9a54..7d8e8dd1 100644 --- a/channels/streamingcommunity.py +++ b/channels/streamingcommunity.py @@ -223,7 +223,7 @@ def episodios(item): action='findvideos', contentType='episode', contentSerieName=item.fulltitle, - url='{}/watch/{}?e={}'.format(host, se['title_id'], ep['id']))) + url='{}/iframe/{}?episode_id={}'.format(host, se['title_id'], ep['id']))) if config.get_setting('episode_info') and not support.stackCheck(['add_tvshow', 'get_newest']): support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) @@ -235,10 +235,8 @@ def episodios(item): def findvideos(item): support.callAds('https://thaudray.com/5/3523301', host) - # Fix for old items in videolibrary - if item.episodeid and item.episodeid not in item.url: - item.url += item.episodeid - itemlist = [item.clone(title=channeltools.get_channel_parameters(item.channel)['title'], url=item.url, server='streamingcommunityws')] + itemlist = [item.clone(title=channeltools.get_channel_parameters(item.channel)['title'], + url=item.url.replace('/watch/', '/iframe/'), server='streamingcommunityws')] return support.server(item, itemlist=itemlist, referer=False) diff --git a/servers/streamingcommunityws.py b/servers/streamingcommunityws.py index f3c0708b..75f894d3 100755 --- a/servers/streamingcommunityws.py +++ b/servers/streamingcommunityws.py @@ -1,56 +1,51 @@ # -*- coding: utf-8 -*- +import urllib.parse + from core import httptools, support, filetools from platformcode import logger, config -UA = httptools.random_useragent() +import ast +UA = httptools.get_user_agent() def test_video_exists(page_url): global scws_id - logger.debug('page url=', page_url) - scws_id = '' - - if page_url.isdigit(): - scws_id = page_url - else: - page = httptools.downloadpage(page_url) - if page.url == page_url: # se non esiste, reindirizza all'ultimo url chiamato esistente - scws_id = support.scrapertools.find_single_match(page.data, r'scws_id[^:]+:(\d+)') - else: - return 'StreamingCommunity', 'Prossimamente' - - if not scws_id: - return False, config.get_localized_string(70449) % 'StreamingCommunityWS' + # logger.debug('page url=', page_url) + # scws_id = '' + # + # if page_url.isdigit(): + # scws_id = page_url + # else: + # page = httptools.downloadpage(page_url) + # if page.url == page_url: # se non esiste, reindirizza all'ultimo url chiamato esistente + # scws_id = support.scrapertools.find_single_match(page.data, r'scws_id[^:]+:(\d+)') + # else: + # return 'StreamingCommunity', 'Prossimamente' + # + # if not scws_id: + # return False, config.get_localized_string(70449) % 'StreamingCommunityWS' return True, "" def get_video_url(page_url, premium=False, user="", password="", video_password=""): - from time import time - from base64 import b64encode - from hashlib import md5 - - global scws_id + from urllib.parse import urlparse video_urls = list() + iframe = support.scrapertools.decodeHtmlentities(support.match(page_url, patron='