diff --git a/channels/altadefinizioneclick.py b/channels/altadefinizioneclick.py index 270dbab5..573e5987 100644 --- a/channels/altadefinizioneclick.py +++ b/channels/altadefinizioneclick.py @@ -138,5 +138,5 @@ def findvideos(item): support.log('findvideos', item) return support.hdpass_get_servers(item) -def play(item): - return support.hdpass_get_url(item) \ No newline at end of file +# def play(item): +# return support.hdpass_get_url(item) \ No newline at end of file diff --git a/channels/animeworld.py b/channels/animeworld.py index 24832100..c7d09213 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -145,48 +145,44 @@ def findvideos(item): import time support.log(item) itemlist = [] - matches = support.match(item, patron=r'class="tab.*?data-name="([0-9]+)">', headers=headers) + matches = support.match(item, patron=r'data-name="([0-9]+)">', headers=headers) data = matches.data matches = matches.matches - videoData = '' + videoData = [] for serverid in matches: - if not item.number: item.number = support.scrapertools.find_single_match(item.title, r'(\d+) -') - block = support.scrapertools.find_multiple_matches(data, 'data-id="' + serverid + '">(.*?)
(.*?)
', item) return support.hdpass_get_servers(item) - -def play(item): - return support.hdpass_get_url(item) \ No newline at end of file diff --git a/channels/seriehd.py b/channels/seriehd.py index 2ed1a8cc..f973f38d 100644 --- a/channels/seriehd.py +++ b/channels/seriehd.py @@ -143,6 +143,3 @@ def findvideos(item): matches = support.match(url,patron=r'(\d+)<', patronBlock=r'

EPISODIO

    (.*?)
').matches if matches: item.url = support.urlparse.urljoin(url, matches[-1][0]) return support.hdpass_get_servers(item) - -def play(item): - return support.hdpass_get_url(item) \ No newline at end of file diff --git a/core/support.py b/core/support.py index 589e1b0b..8796027e 100755 --- a/core/support.py +++ b/core/support.py @@ -34,38 +34,44 @@ from specials import autoplay def hdpass_get_servers(item): def get_hosts(url, quality): ret = [] - page = httptools.downloadpage(url).data - + page = httptools.downloadpage(url, CF=False).data mir = scrapertools.find_single_match(page, patron_mir) - for mir_url, srv in scrapertools.find_multiple_matches(mir, patron_option): - mir_url = scrapertools.decodeHtmlentities(mir_url) - ret.append(Item(channel=item.channel, - action="play", - fulltitle=item.fulltitle, - quality=quality, - show=item.show, - thumbnail=item.thumbnail, - contentType=item.contentType, - title=srv, - server=srv, - url= mir_url)) + with futures.ThreadPoolExecutor() as executor: + thL = [] + for mir_url, srv in scrapertools.find_multiple_matches(mir, patron_option): + mir_url = scrapertools.decodeHtmlentities(mir_url) + log(mir_url) + it = Item(channel=item.channel, + action="play", + fulltitle=item.fulltitle, + quality=quality, + show=item.show, + thumbnail=item.thumbnail, + contentType=item.contentType, + title=srv, + # server=srv, + url= mir_url) + thL.append(executor.submit(hdpass_get_url, it)) + for res in futures.as_completed(thL): + if res.result(): + ret.append(res.result()[0]) return ret # Carica la pagina itemlist = [] if 'hdpass' in item.url or 'hdplayer' in item.url: url = item.url else: - data = httptools.downloadpage(item.url).data.replace('\n', '') + data = httptools.downloadpage(item.url, CF=False).data.replace('\n', '') patron = r']+><\/iframe>' - url = scrapertools.find_single_match(data, patron).replace("?alta", "") + url = scrapertools.find_single_match(data, patron) url = url.replace("&download=1", "") if 'hdpass' not in url and 'hdplayer' not in url: return itemlist if not url.startswith('http'): url = 'https:' + url - data = httptools.downloadpage(url).data + data = httptools.downloadpage(url, CF=False).data patron_res = '
(.*?)
(.*?)
([^<]+?)' @@ -84,7 +90,7 @@ def hdpass_get_servers(item): def hdpass_get_url(item): patron_media = r'