fix ilgenio, link sotto vcrypt&company
This commit is contained in:
@@ -173,6 +173,7 @@ def newest(categoria):
|
|||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
|
from lib import unshortenit
|
||||||
log()
|
log()
|
||||||
matches = support.match(item, patron=[r'class="metaframe rptss" src="([^"]+)"',r' href="#option-\d">([^\s]+)\s*([^\s]+)']).matches
|
matches = support.match(item, patron=[r'class="metaframe rptss" src="([^"]+)"',r' href="#option-\d">([^\s]+)\s*([^\s]+)']).matches
|
||||||
itemlist = []
|
itemlist = []
|
||||||
@@ -188,13 +189,23 @@ def findvideos(item):
|
|||||||
match = support.httptools.downloadpage(match, follow_redirect=True).url
|
match = support.httptools.downloadpage(match, follow_redirect=True).url
|
||||||
list_url.append(match)
|
list_url.append(match)
|
||||||
|
|
||||||
for i, url in enumerate(list_url):
|
def unshorten(i, url):
|
||||||
itemlist.append(support.Item(
|
url = unshortenit.unshorten(url)[0]
|
||||||
|
return support.Item(
|
||||||
channel=item.channel,
|
channel=item.channel,
|
||||||
title=list_servers[i],
|
title=list_servers[i],
|
||||||
url=url,
|
url=url,
|
||||||
action='play',
|
action='play',
|
||||||
quality=list_quality[i],
|
quality=list_quality[i],
|
||||||
infoLabels = item.infoLabels))
|
infoLabels=item.infoLabels)
|
||||||
|
import sys
|
||||||
|
if sys.version_info[0] >= 3:
|
||||||
|
from concurrent import futures
|
||||||
|
else:
|
||||||
|
from concurrent_py2 import futures
|
||||||
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
|
unshList = [executor.submit(unshorten, i, url) for i, url in enumerate(list_url)]
|
||||||
|
for it in futures.as_completed(unshList):
|
||||||
|
itemlist.append(it.result())
|
||||||
|
|
||||||
return support.server(item, itemlist=itemlist)
|
return support.server(item, itemlist=itemlist)
|
||||||
|
|||||||
Reference in New Issue
Block a user